File: globals.typedarray.d.ts

package info (click to toggle)
nodejs 22.21.1%2Bdfsg%2B~cs22.19.0-6
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 251,928 kB
  • sloc: cpp: 1,542,927; javascript: 597,777; ansic: 114,330; python: 60,784; sh: 4,155; makefile: 2,918; asm: 1,750; pascal: 1,565; perl: 248; lisp: 222; xml: 42
file content (38 lines) | stat: -rw-r--r-- 1,825 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
export {}; // Make this a module

declare global {
    namespace NodeJS {
        type TypedArray<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> =
            | Uint8Array<TArrayBuffer>
            | Uint8ClampedArray<TArrayBuffer>
            | Uint16Array<TArrayBuffer>
            | Uint32Array<TArrayBuffer>
            | Int8Array<TArrayBuffer>
            | Int16Array<TArrayBuffer>
            | Int32Array<TArrayBuffer>
            | BigUint64Array<TArrayBuffer>
            | BigInt64Array<TArrayBuffer>
            | Float32Array<TArrayBuffer>
            | Float64Array<TArrayBuffer>;
        type ArrayBufferView<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> =
            | TypedArray<TArrayBuffer>
            | DataView<TArrayBuffer>;

        // The following aliases are required to allow use of non-shared ArrayBufferViews in @types/node
        // while maintaining compatibility with TS <=5.6.
        type NonSharedUint8Array = Uint8Array<ArrayBuffer>;
        type NonSharedUint8ClampedArray = Uint8ClampedArray<ArrayBuffer>;
        type NonSharedUint16Array = Uint16Array<ArrayBuffer>;
        type NonSharedUint32Array = Uint32Array<ArrayBuffer>;
        type NonSharedInt8Array = Int8Array<ArrayBuffer>;
        type NonSharedInt16Array = Int16Array<ArrayBuffer>;
        type NonSharedInt32Array = Int32Array<ArrayBuffer>;
        type NonSharedBigUint64Array = BigUint64Array<ArrayBuffer>;
        type NonSharedBigInt64Array = BigInt64Array<ArrayBuffer>;
        type NonSharedFloat32Array = Float32Array<ArrayBuffer>;
        type NonSharedFloat64Array = Float64Array<ArrayBuffer>;
        type NonSharedDataView = DataView<ArrayBuffer>;
        type NonSharedTypedArray = TypedArray<ArrayBuffer>;
        type NonSharedArrayBufferView = ArrayBufferView<ArrayBuffer>;
    }
}