Skip to content

Commit

Permalink
[types] improve types
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Dec 17, 2024
1 parent 34579df commit 86bc612
Showing 1 changed file with 5 additions and 14 deletions.
19 changes: 5 additions & 14 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import type { TypedArray } from 'is-typed-array';

/**
* Determines the type of the given collection, or returns false.
*
Expand All @@ -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'
Expand All @@ -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
Expand Down

0 comments on commit 86bc612

Please sign in to comment.