1 | // Type definitions for non-npm package Node.js 14.0
|
2 | // Project: http://nodejs.org/
|
3 | // Definitions by: Microsoft TypeScript <https://github.com/Microsoft>
|
4 | // DefinitelyTyped <https://github.com/DefinitelyTyped>
|
5 | // Alberto Schiabel <https://github.com/jkomyno>
|
6 | // Alexander T. <https://github.com/a-tarasyuk>
|
7 | // Alvis HT Tang <https://github.com/alvis>
|
8 | // Andrew Makarov <https://github.com/r3nya>
|
9 | // Benjamin Toueg <https://github.com/btoueg>
|
10 | // Bruno Scheufler <https://github.com/brunoscheufler>
|
11 | // Chigozirim C. <https://github.com/smac89>
|
12 | // David Junger <https://github.com/touffy>
|
13 | // Deividas Bakanas <https://github.com/DeividasBakanas>
|
14 | // Eugene Y. Q. Shen <https://github.com/eyqs>
|
15 | // Flarna <https://github.com/Flarna>
|
16 | // Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>
|
17 | // Hoàng Văn Khải <https://github.com/KSXGitHub>
|
18 | // Huw <https://github.com/hoo29>
|
19 | // Kelvin Jin <https://github.com/kjin>
|
20 | // Klaus Meinhardt <https://github.com/ajafff>
|
21 | // Lishude <https://github.com/islishude>
|
22 | // Mariusz Wiktorczyk <https://github.com/mwiktorczyk>
|
23 | // Mohsen Azimi <https://github.com/mohsen1>
|
24 | // Nicolas Even <https://github.com/n-e>
|
25 | // Nicolas Voigt <https://github.com/octo-sniffle>
|
26 | // Nikita Galkin <https://github.com/galkin>
|
27 | // Parambir Singh <https://github.com/parambirs>
|
28 | // Sebastian Silbermann <https://github.com/eps1lon>
|
29 | // Simon Schick <https://github.com/SimonSchick>
|
30 | // Thomas den Hollander <https://github.com/ThomasdenH>
|
31 | // Wilco Bakker <https://github.com/WilcoBakker>
|
32 | // wwwy3y3 <https://github.com/wwwy3y3>
|
33 | // Samuel Ainsworth <https://github.com/samuela>
|
34 | // Kyle Uehlein <https://github.com/kuehlein>
|
35 | // Jordi Oliveras Rovira <https://github.com/j-oliveras>
|
36 | // Thanik Bhongbhibhat <https://github.com/bhongy>
|
37 | // Marcin Kopacz <https://github.com/chyzwar>
|
38 | // Trivikram Kamat <https://github.com/trivikr>
|
39 | // Minh Son Nguyen <https://github.com/nguymin4>
|
40 | // Junxiao Shi <https://github.com/yoursunny>
|
41 | // Ilia Baryshnikov <https://github.com/qwelias>
|
42 | // ExE Boss <https://github.com/ExE-Boss>
|
43 | // Surasak Chaisurin <https://github.com/Ryan-Willpower>
|
44 | // Piotr Błażejewicz <https://github.com/peterblazejewicz>
|
45 | // Anna Henningsen <https://github.com/addaleax>
|
46 | // Jason Kwok <https://github.com/JasonHK>
|
47 | // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
48 |
|
49 | // NOTE: These definitions support NodeJS and TypeScript 3.5.
|
50 |
|
51 | // NOTE: TypeScript version-specific augmentations can be found in the following paths:
|
52 | // - ~/base.d.ts - Shared definitions common to all TypeScript versions
|
53 | // - ~/index.d.ts - Definitions specific to TypeScript 2.8
|
54 | // - ~/ts3.5/index.d.ts - Definitions specific to TypeScript 3.5
|
55 |
|
56 | // NOTE: Augmentations for TypeScript 3.5 and later should use individual files for overrides
|
57 | // within the respective ~/ts3.5 (or later) folder. However, this is disallowed for versions
|
58 | // prior to TypeScript 3.5, so the older definitions will be found here.
|
59 |
|
60 | // Base definitions for all NodeJS modules that are not specific to any version of TypeScript:
|
61 | /// <reference path="base.d.ts" />
|
62 |
|
63 | // We can't include globals.global.d.ts in globals.d.ts, as it'll cause duplication errors in TypeScript 3.5+
|
64 | /// <reference path="globals.global.d.ts" />
|
65 |
|
66 | // We can't include assert.d.ts in base.d.ts, as it'll cause duplication errors in TypeScript 3.7+
|
67 | /// <reference path="assert.d.ts" />
|
68 |
|
69 | // Forward-declarations for needed types from es2015 and later (in case users are using `--lib es5`)
|
70 | // Empty interfaces are used here which merge fine with the real declarations in the lib XXX files
|
71 | // just to ensure the names are known and node typings can be used without importing these libs.
|
72 | // if someone really needs these types the libs need to be added via --lib or in tsconfig.json
|
73 | interface AsyncIterable<T> { }
|
74 | interface IterableIterator<T> { }
|
75 | interface AsyncIterableIterator<T> {}
|
76 | interface SymbolConstructor {
|
77 | readonly asyncIterator: symbol;
|
78 | }
|
79 | declare var Symbol: SymbolConstructor;
|
80 | // even this is just a forward declaration some properties are added otherwise
|
81 | // it would be allowed to pass anything to e.g. Buffer.from()
|
82 | interface SharedArrayBuffer {
|
83 | readonly byteLength: number;
|
84 | slice(begin?: number, end?: number): SharedArrayBuffer;
|
85 | }
|
86 |
|
87 | declare module "util" {
|
88 | namespace types {
|
89 | function isBigInt64Array(value: any): boolean;
|
90 | function isBigUint64Array(value: any): boolean;
|
91 | }
|
92 | }
|