From 86bc61207e5970c2c7e13cdda4ccdeb0981ac40b Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Tue, 17 Dec 2024 13:03:03 -0800 Subject: [PATCH] [types] improve types --- index.d.ts | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/index.d.ts b/index.d.ts index f897670..ae1d948 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,3 +1,5 @@ +import type { TypedArray } from 'is-typed-array'; + /** * Determines the type of the given collection, or returns false. * @@ -19,7 +21,7 @@ declare function whichTypedArray(value: whichTypedArray.TypedArray): whichTypedA declare function whichTypedArray(value: unknown): false | null; declare namespace whichTypedArray { - type TypedArrayName = + export type TypedArrayName = | 'Int8Array' | 'Uint8Array' | 'Uint8ClampedArray' @@ -32,20 +34,9 @@ declare namespace whichTypedArray { | 'BigInt64Array' | 'BigUint64Array'; - type TypedArray = - | Int8Array - | Uint8Array - | Uint8ClampedArray - | Int16Array - | Uint16Array - | Int32Array - | Uint32Array - | Float32Array - | Float64Array - | BigInt64Array - | BigUint64Array; + export type { TypedArray }; - type TypedArrayConstructor = + export type TypedArrayConstructor = | Int8ArrayConstructor | Uint8ArrayConstructor | Uint8ClampedArrayConstructor