index.d.ts 509 B

1234567891011121314151617181920212223
  1. import type names from 'possible-typed-array-names';
  2. declare function typedArrayLength(value: typedArrayLength.TypedArray): number;
  3. declare function typedArrayLength(value: unknown): false;
  4. declare namespace typedArrayLength {
  5. type TypedArray =
  6. | Int8Array
  7. | Uint8Array
  8. | Uint8ClampedArray
  9. | Int16Array
  10. | Uint16Array
  11. | Int32Array
  12. | Uint32Array
  13. | Float32Array
  14. | Float64Array
  15. | BigInt64Array
  16. | BigUint64Array;
  17. type TypedArrayName = typeof names[number];
  18. }
  19. export = typedArrayLength;