source: imaps-frontend/node_modules/which-typed-array/index.d.ts

main
Last change on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 2.1 KB
Line 
1/**
2 * Determines the type of the given collection, or returns false.
3 *
4 * @param {unknown} value The potential collection
5 * @returns {TypedArrayName | false | null} 'Int8Array' | 'Uint8Array' | 'Uint8ClampedArray' | 'Int16Array' | 'Uint16Array' | 'Int32Array' | 'Uint32Array' | 'Float32Array' | 'Float64Array' | 'BigInt64Array' | 'BigUint64Array' | false | null
6 */
7declare function whichTypedArray(value: Int8Array): 'Int8Array';
8declare function whichTypedArray(value: Uint8Array): 'Uint8Array';
9declare function whichTypedArray(value: Uint8ClampedArray): 'Uint8ClampedArray';
10declare function whichTypedArray(value: Int16Array): 'Int16Array';
11declare function whichTypedArray(value: Uint16Array): 'Uint16Array';
12declare function whichTypedArray(value: Int32Array): 'Int32Array';
13declare function whichTypedArray(value: Uint32Array): 'Uint32Array';
14declare function whichTypedArray(value: Float32Array): 'Float32Array';
15declare function whichTypedArray(value: Float64Array): 'Float64Array';
16declare function whichTypedArray(value: BigInt64Array): 'BigInt64Array';
17declare function whichTypedArray(value: BigUint64Array): 'BigUint64Array';
18declare function whichTypedArray(value: unknown): false | null;
19
20declare namespace whichTypedArray {
21 type TypedArrayName =
22 | 'Int8Array'
23 | 'Uint8Array'
24 | 'Uint8ClampedArray'
25 | 'Int16Array'
26 | 'Uint16Array'
27 | 'Int32Array'
28 | 'Uint32Array'
29 | 'Float32Array'
30 | 'Float64Array'
31 | 'BigInt64Array'
32 | 'BigUint64Array';
33
34 type TypedArray =
35 | Int8Array
36 | Uint8Array
37 | Uint8ClampedArray
38 | Int16Array
39 | Uint16Array
40 | Int32Array
41 | Uint32Array
42 | Float32Array
43 | Float64Array
44 | BigInt64Array
45 | BigUint64Array;
46
47 type TypedArrayConstructor =
48 | Int8ArrayConstructor
49 | Uint8ArrayConstructor
50 | Uint8ClampedArrayConstructor
51 | Int16ArrayConstructor
52 | Uint16ArrayConstructor
53 | Int32ArrayConstructor
54 | Uint32ArrayConstructor
55 | Float32ArrayConstructor
56 | Float64ArrayConstructor
57 | BigInt64ArrayConstructor
58 | BigUint64ArrayConstructor;
59}
60
61export = whichTypedArray;
Note: See TracBrowser for help on using the repository browser.