diff --git a/package.json b/package.json index adc9dbb..3ea175b 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,6 @@ "callsites": "^4.0.0", "dot-prop": "^7.2.0", "lodash.isequal": "^4.5.0", - "type-fest": "^2.13.0", "vali-date": "^1.0.0" }, "devDependencies": { diff --git a/source/predicates.ts b/source/predicates.ts index 6922c16..67c6d88 100644 --- a/source/predicates.ts +++ b/source/predicates.ts @@ -1,5 +1,5 @@ import type {Buffer} from 'node:buffer'; -import {TypedArray} from 'type-fest'; +import {TypedArray} from './typed-array.js'; import {StringPredicate} from './predicates/string.js'; import {NumberPredicate} from './predicates/number.js'; import {BigIntPredicate} from './predicates/bigint.js'; diff --git a/source/predicates/typed-array.ts b/source/predicates/typed-array.ts index 77ae701..4b803f4 100644 --- a/source/predicates/typed-array.ts +++ b/source/predicates/typed-array.ts @@ -1,4 +1,4 @@ -import {TypedArray} from 'type-fest'; +import {TypedArray} from '../typed-array.js'; import {Predicate} from './predicate.js'; export class TypedArrayPredicate extends Predicate { diff --git a/source/typed-array.ts b/source/typed-array.ts new file mode 100644 index 0000000..f9e687b --- /dev/null +++ b/source/typed-array.ts @@ -0,0 +1,13 @@ +// https://github.com/sindresorhus/type-fest/blob/main/source/typed-array.d.ts +export type TypedArray = + | Int8Array + | Uint8Array + | Uint8ClampedArray + | Int16Array + | Uint16Array + | Int32Array + | Uint32Array + | Float32Array + | Float64Array + | BigInt64Array + | BigUint64Array; diff --git a/test/types.ts b/test/types.ts index c47b334..f289957 100644 --- a/test/types.ts +++ b/test/types.ts @@ -1,7 +1,7 @@ import type {Buffer} from 'node:buffer'; import test from 'ava'; import {ExpectTypeOf, expectTypeOf} from 'expect-type'; -import {TypedArray} from 'type-fest'; +import {TypedArray} from '../source/typed-array.js'; import ow, {BasePredicate, Infer} from '../source/index.js'; test('type-level tests', t => {