@types/node 11.15.54 → 12.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. node v11.15/LICENSE → node/LICENSE +21 -21
  2. node/README.md +16 -0
  3. node v11.15/ts3.6/assert.d.ts → node/assert.d.ts +12 -33
  4. node v11.15/async_hooks.d.ts → node/async_hooks.d.ts +3 -15
  5. node/base.d.ts +41 -0
  6. {node v11.15 → node}/buffer.d.ts +0 -0
  7. node v11.15/child_process.d.ts → node/child_process.d.ts +8 -10
  8. {node v11.15 → node}/cluster.d.ts +0 -0
  9. {node v11.15 → node}/console.d.ts +0 -0
  10. node v11.15/constants.d.ts → node/constants.d.ts +0 -36
  11. node v11.15/crypto.d.ts → node/crypto.d.ts +112 -264
  12. node v11.15/dgram.d.ts → node/dgram.d.ts +1 -1
  13. node v11.15/dns.d.ts → node/dns.d.ts +1 -75
  14. node/domain.d.ts +16 -0
  15. node/events.d.ts +30 -0
  16. node v11.15/fs.d.ts → node/fs.d.ts +9 -17
  17. node v11.15/globals.d.ts → node/globals.d.ts +18 -93
  18. node v11.15/http.d.ts → node/http.d.ts +5 -10
  19. node v11.15/http2.d.ts → node/http2.d.ts +3 -3
  20. {node v11.15 → node}/https.d.ts +0 -0
  21. node/index.d.ts +99 -0
  22. node v11.15/inspector.d.ts → node/inspector.d.ts +2 -2
  23. {node v11.15 → node}/module.d.ts +0 -0
  24. {node v11.15 → node}/net.d.ts +0 -0
  25. node v11.15/os.d.ts → node/os.d.ts +0 -4
  26. node v11.15/package.json → node/package.json +39 -24
  27. {node v11.15 → node}/path.d.ts +0 -0
  28. node v11.15/perf_hooks.d.ts → node/perf_hooks.d.ts +77 -5
  29. {node v11.15 → node}/process.d.ts +0 -0
  30. node/punycode.d.ts +12 -0
  31. node v11.15/querystring.d.ts → node/querystring.d.ts +4 -9
  32. node v11.15/readline.d.ts → node/readline.d.ts +1 -2
  33. node v11.15/repl.d.ts → node/repl.d.ts +5 -13
  34. node v11.15/stream.d.ts → node/stream.d.ts +6 -16
  35. {node v11.15 → node}/string_decoder.d.ts +0 -0
  36. {node v11.15 → node}/timers.d.ts +0 -0
  37. node v11.15/tls.d.ts → node/tls.d.ts +3 -4
  38. {node v11.15 → node}/trace_events.d.ts +0 -0
  39. node/ts3.2/globals.d.ts +19 -0
  40. node v11.15/base.d.ts → node/ts3.2/index.d.ts +7 -6
  41. node/ts3.2/util.d.ts +15 -0
  42. node v11.15/tty.d.ts → node/tty.d.ts +0 -2
  43. node v11.15/url.d.ts → node/url.d.ts +1 -7
  44. node v11.15/util.d.ts → node/util.d.ts +20 -49
  45. {node v11.15 → node}/v8.d.ts +0 -0
  46. node v11.15/vm.d.ts → node/vm.d.ts +2 -4
  47. node v11.15/worker_threads.d.ts → node/worker_threads.d.ts +2 -4
  48. node v11.15/zlib.d.ts → node/zlib.d.ts +0 -1
  49. node v11.15/README.md +0 -16
  50. node v11.15/assert.d.ts +0 -99
  51. node v11.15/domain.d.ts +0 -16
  52. node v11.15/events.d.ts +0 -30
  53. node v11.15/index.d.ts +0 -43
  54. node v11.15/punycode.d.ts +0 -68
  55. node v11.15/ts3.6/base.d.ts +0 -54
  56. node v11.15/ts3.6/index.d.ts +0 -6
@@ -1,21 +1,12 @@
1
1
  declare module "util" {
2
2
  interface InspectOptions extends NodeJS.InspectOptions { }
3
- function format(format?: any, ...param: any[]): string;
4
- function formatWithOptions(inspectOptions: InspectOptions, format?: any, ...param: any[]): string;
5
- /** @deprecated since v0.11.3 - use `console.error()` instead. */
6
- function debug(string: string): void;
7
- /** @deprecated since v0.11.3 - use `console.error()` instead. */
8
- function error(...param: any[]): void;
9
- /** @deprecated since v0.11.3 - use `console.log()` instead. */
10
- function puts(...param: any[]): void;
11
- /** @deprecated since v0.11.3 - use `console.log()` instead. */
12
- function print(...param: any[]): void;
3
+ function format(format: any, ...param: any[]): string;
4
+ function formatWithOptions(inspectOptions: InspectOptions, format: string, ...param: any[]): string;
13
5
  /** @deprecated since v0.11.3 - use a third party module instead. */
14
6
  function log(string: string): void;
15
7
  function inspect(object: any, showHidden?: boolean, depth?: number | null, color?: boolean): string;
16
8
  function inspect(object: any, options: InspectOptions): string;
17
9
  namespace inspect {
18
- const custom: unique symbol;
19
10
  let colors: {
20
11
  [color: string]: [number, number] | undefined
21
12
  };
@@ -94,82 +85,62 @@ declare module "util" {
94
85
 
95
86
  function promisify<TCustom extends Function>(fn: CustomPromisify<TCustom>): TCustom;
96
87
  function promisify<TResult>(fn: (callback: (err: Error | null, result: TResult) => void) => void): () => Promise<TResult>;
97
- function promisify(fn: (callback: (err?: Error) => void) => void): () => Promise<void>;
88
+ function promisify(fn: (callback: (err?: Error | null) => void) => void): () => Promise<void>;
98
89
  function promisify<T1, TResult>(fn: (arg1: T1, callback: (err: Error | null, result: TResult) => void) => void): (arg1: T1) => Promise<TResult>;
99
- function promisify<T1>(fn: (arg1: T1, callback: (err?: Error) => void) => void): (arg1: T1) => Promise<void>;
90
+ function promisify<T1>(fn: (arg1: T1, callback: (err?: Error | null) => void) => void): (arg1: T1) => Promise<void>;
100
91
  function promisify<T1, T2, TResult>(fn: (arg1: T1, arg2: T2, callback: (err: Error | null, result: TResult) => void) => void): (arg1: T1, arg2: T2) => Promise<TResult>;
101
- function promisify<T1, T2>(fn: (arg1: T1, arg2: T2, callback: (err?: Error) => void) => void): (arg1: T1, arg2: T2) => Promise<void>;
92
+ function promisify<T1, T2>(fn: (arg1: T1, arg2: T2, callback: (err?: Error | null) => void) => void): (arg1: T1, arg2: T2) => Promise<void>;
102
93
  function promisify<T1, T2, T3, TResult>(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err: Error | null, result: TResult) => void) => void): (arg1: T1, arg2: T2, arg3: T3) => Promise<TResult>;
103
- function promisify<T1, T2, T3>(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err?: Error) => void) => void): (arg1: T1, arg2: T2, arg3: T3) => Promise<void>;
94
+ function promisify<T1, T2, T3>(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err?: Error | null) => void) => void): (arg1: T1, arg2: T2, arg3: T3) => Promise<void>;
104
95
  function promisify<T1, T2, T3, T4, TResult>(
105
96
  fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: Error | null, result: TResult) => void) => void,
106
97
  ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<TResult>;
107
- function promisify<T1, T2, T3, T4>(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err?: Error) => void) => void): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<void>;
98
+ function promisify<T1, T2, T3, T4>(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err?: Error | null) => void) => void): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<void>;
108
99
  function promisify<T1, T2, T3, T4, T5, TResult>(
109
100
  fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: Error | null, result: TResult) => void) => void,
110
101
  ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<TResult>;
111
102
  function promisify<T1, T2, T3, T4, T5>(
112
- fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err?: Error) => void) => void,
103
+ fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err?: Error | null) => void) => void,
113
104
  ): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<void>;
114
105
  function promisify(fn: Function): Function;
115
106
 
116
- namespace promisify {
117
- const custom: unique symbol;
118
- }
119
-
120
107
  namespace types {
121
- function isAnyArrayBuffer(object: any): object is ArrayBufferLike;
108
+ function isAnyArrayBuffer(object: any): boolean;
122
109
  function isArgumentsObject(object: any): object is IArguments;
123
110
  function isArrayBuffer(object: any): object is ArrayBuffer;
124
- function isArrayBufferView(object: any): object is NodeJS.ArrayBufferView;
125
111
  function isAsyncFunction(object: any): boolean;
126
- function isBigInt64Array(value: any): value is BigInt64Array;
127
- function isBigUint64Array(value: any): value is BigUint64Array;
128
112
  function isBooleanObject(object: any): object is Boolean;
129
- function isBoxedPrimitive(object: any): object is String | Number | BigInt | Boolean | Symbol;
113
+ function isBoxedPrimitive(object: any): object is (Number | Boolean | String | Symbol /* | Object(BigInt) | Object(Symbol) */);
130
114
  function isDataView(object: any): object is DataView;
131
115
  function isDate(object: any): object is Date;
132
116
  function isExternal(object: any): boolean;
133
117
  function isFloat32Array(object: any): object is Float32Array;
134
118
  function isFloat64Array(object: any): object is Float64Array;
135
- function isGeneratorFunction(object: any): object is GeneratorFunction;
136
- function isGeneratorObject(object: any): object is Generator;
119
+ function isGeneratorFunction(object: any): boolean;
120
+ function isGeneratorObject(object: any): boolean;
137
121
  function isInt8Array(object: any): object is Int8Array;
138
122
  function isInt16Array(object: any): object is Int16Array;
139
123
  function isInt32Array(object: any): object is Int32Array;
140
- function isMap<T>(
141
- object: T | {},
142
- ): object is T extends ReadonlyMap<any, any>
143
- ? unknown extends T
144
- ? never
145
- : ReadonlyMap<any, any>
146
- : Map<any, any>;
124
+ function isMap(object: any): boolean;
147
125
  function isMapIterator(object: any): boolean;
148
126
  function isModuleNamespaceObject(value: any): boolean;
149
127
  function isNativeError(object: any): object is Error;
150
128
  function isNumberObject(object: any): object is Number;
151
- function isPromise(object: any): object is Promise<any>;
129
+ function isPromise(object: any): boolean;
152
130
  function isProxy(object: any): boolean;
153
131
  function isRegExp(object: any): object is RegExp;
154
- function isSet<T>(
155
- object: T | {},
156
- ): object is T extends ReadonlySet<any>
157
- ? unknown extends T
158
- ? never
159
- : ReadonlySet<any>
160
- : Set<any>;
132
+ function isSet(object: any): boolean;
161
133
  function isSetIterator(object: any): boolean;
162
- function isSharedArrayBuffer(object: any): object is SharedArrayBuffer;
163
- function isStringObject(object: any): object is String;
164
- function isSymbolObject(object: any): object is Symbol;
134
+ function isSharedArrayBuffer(object: any): boolean;
135
+ function isStringObject(object: any): boolean;
136
+ function isSymbolObject(object: any): boolean;
165
137
  function isTypedArray(object: any): object is NodeJS.TypedArray;
166
138
  function isUint8Array(object: any): object is Uint8Array;
167
139
  function isUint8ClampedArray(object: any): object is Uint8ClampedArray;
168
140
  function isUint16Array(object: any): object is Uint16Array;
169
141
  function isUint32Array(object: any): object is Uint32Array;
170
- function isWeakMap(object: any): object is WeakMap<any, any>;
171
- function isWeakSet(object: any): object is WeakSet<any>;
172
- /** @deprecated Removed in v14.0.0 */
142
+ function isWeakMap(object: any): boolean;
143
+ function isWeakSet(object: any): boolean;
173
144
  function isWebAssemblyCompiledModule(object: any): boolean;
174
145
  }
175
146
 
File without changes
@@ -15,7 +15,7 @@ declare module "vm" {
15
15
  lineOffset?: number;
16
16
  /**
17
17
  * Specifies the column number offset that is displayed in stack traces produced by this script.
18
- * @default 0
18
+ * Default: `0`
19
19
  */
20
20
  columnOffset?: number;
21
21
  }
@@ -23,7 +23,6 @@ declare module "vm" {
23
23
  displayErrors?: boolean;
24
24
  timeout?: number;
25
25
  cachedData?: Buffer;
26
- /** @deprecated in favor of `script.createCachedData()` */
27
26
  produceCachedData?: boolean;
28
27
  }
29
28
  interface RunningScriptOptions extends BaseOptions {
@@ -55,12 +54,11 @@ declare module "vm" {
55
54
  runInContext(contextifiedSandbox: Context, options?: RunningScriptOptions): any;
56
55
  runInNewContext(sandbox?: Context, options?: RunningScriptOptions): any;
57
56
  runInThisContext(options?: RunningScriptOptions): any;
58
- cachedDataRejected?: boolean;
59
57
  }
60
58
  function createContext(sandbox?: Context): Context;
61
59
  function isContext(sandbox: Context): boolean;
62
60
  function runInContext(code: string, contextifiedSandbox: Context, options?: RunningScriptOptions | string): any;
63
61
  function runInNewContext(code: string, sandbox?: Context, options?: RunningScriptOptions | string): any;
64
62
  function runInThisContext(code: string, options?: RunningScriptOptions | string): any;
65
- function compileFunction(code: string, params?: ReadonlyArray<string>, options?: CompileFunctionOptions): Function;
63
+ function compileFunction(code: string, params: string[], options: CompileFunctionOptions): Function;
66
64
  }
@@ -5,7 +5,6 @@ declare module "worker_threads" {
5
5
 
6
6
  const isMainThread: boolean;
7
7
  const parentPort: null | MessagePort;
8
- const SHARE_ENV: unique symbol;
9
8
  const threadId: number;
10
9
  const workerData: any;
11
10
 
@@ -16,7 +15,7 @@ declare module "worker_threads" {
16
15
 
17
16
  class MessagePort extends EventEmitter {
18
17
  close(): void;
19
- postMessage(value: any, transferList?: ReadonlyArray<ArrayBuffer | MessagePort>): void;
18
+ postMessage(value: any, transferList?: Array<ArrayBuffer | MessagePort>): void;
20
19
  ref(): void;
21
20
  unref(): void;
22
21
  start(): void;
@@ -56,7 +55,6 @@ declare module "worker_threads" {
56
55
 
57
56
  interface WorkerOptions {
58
57
  eval?: boolean;
59
- env?: NodeJS.ProcessEnv | typeof SHARE_ENV;
60
58
  workerData?: any;
61
59
  stdin?: boolean;
62
60
  stdout?: boolean;
@@ -72,7 +70,7 @@ declare module "worker_threads" {
72
70
 
73
71
  constructor(filename: string, options?: WorkerOptions);
74
72
 
75
- postMessage(value: any, transferList?: ReadonlyArray<ArrayBuffer | MessagePort>): void;
73
+ postMessage(value: any, transferList?: Array<ArrayBuffer | MessagePort>): void;
76
74
  ref(): void;
77
75
  unref(): void;
78
76
  terminate(callback?: (err: Error, exitCode: number) => void): void;
@@ -19,7 +19,6 @@ declare module "zlib" {
19
19
  memLevel?: number; // compression only
20
20
  strategy?: number; // compression only
21
21
  dictionary?: Buffer | NodeJS.TypedArray | DataView | ArrayBuffer; // deflate/inflate only, empty dictionary by default
22
- info?: boolean;
23
22
  }
24
23
 
25
24
  interface BrotliOptions {
node v11.15/README.md DELETED
@@ -1,16 +0,0 @@
1
- # Installation
2
- > `npm install --save @types/node`
3
-
4
- # Summary
5
- This package contains type definitions for Node.js (http://nodejs.org/).
6
-
7
- # Details
8
- Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node/v11.
9
-
10
- ### Additional Details
11
- * Last updated: Wed, 12 May 2021 19:31:32 GMT
12
- * Dependencies: none
13
- * Global values: `Buffer`, `NodeJS`, `__dirname`, `__filename`, `clearImmediate`, `clearInterval`, `clearTimeout`, `console`, `exports`, `global`, `module`, `process`, `queueMicrotask`, `require`, `setImmediate`, `setInterval`, `setTimeout`
14
-
15
- # Credits
16
- These definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [DefinitelyTyped](https://github.com/DefinitelyTyped), [Alberto Schiabel](https://github.com/jkomyno), [Alvis HT Tang](https://github.com/alvis), [Andrew Makarov](https://github.com/r3nya), [Benjamin Toueg](https://github.com/btoueg), [Chigozirim C.](https://github.com/smac89), [David Junger](https://github.com/touffy), [Deividas Bakanas](https://github.com/DeividasBakanas), [Eugene Y. Q. Shen](https://github.com/eyqs), [Hannes Magnusson](https://github.com/Hannes-Magnusson-CK), [Hoàng Văn Khải](https://github.com/KSXGitHub), [Huw](https://github.com/hoo29), [Kelvin Jin](https://github.com/kjin), [Klaus Meinhardt](https://github.com/ajafff), [Lishude](https://github.com/islishude), [Mariusz Wiktorczyk](https://github.com/mwiktorczyk), [Mohsen Azimi](https://github.com/mohsen1), [Nicolas Even](https://github.com/n-e), [Nikita Galkin](https://github.com/galkin), [Parambir Singh](https://github.com/parambirs), [Sebastian Silbermann](https://github.com/eps1lon), [Simon Schick](https://github.com/SimonSchick), [Thomas den Hollander](https://github.com/ThomasdenH), [Wilco Bakker](https://github.com/WilcoBakker), [wwwy3y3](https://github.com/wwwy3y3), [Zane Hannan AU](https://github.com/ZaneHannanAU), [Jeremie Rodriguez](https://github.com/jeremiergz), [Samuel Ainsworth](https://github.com/samuela), [Kyle Uehlein](https://github.com/kuehlein), [Thanik Bhongbhibhat](https://github.com/bhongy), [Ivan Sieder](https://github.com/ivansieder), [Minh Son Nguyen](https://github.com/nguymin4), and [ExE Boss](https://github.com/ExE-Boss).
node v11.15/assert.d.ts DELETED
@@ -1,99 +0,0 @@
1
- declare module 'assert' {
2
- function assert(value: any, message?: string | Error): asserts value;
3
- namespace assert {
4
- class AssertionError implements Error {
5
- name: string;
6
- message: string;
7
- actual: any;
8
- expected: any;
9
- operator: string;
10
- generatedMessage: boolean;
11
- code: 'ERR_ASSERTION';
12
-
13
- constructor(options?: {
14
- message?: string;
15
- actual?: any;
16
- expected?: any;
17
- operator?: string;
18
- // tslint:disable-next-line:ban-types
19
- stackStartFn?: Function;
20
- });
21
- }
22
-
23
- type AssertPredicate = RegExp | (new () => object) | ((thrown: any) => boolean) | object | Error;
24
-
25
- function fail(message?: string | Error): never;
26
- /** @deprecated since v10.0.0 - use fail([message]) or other assert functions instead. */
27
- function fail(
28
- actual: any,
29
- expected: any,
30
- message?: string | Error,
31
- operator?: string,
32
- // tslint:disable-next-line:ban-types
33
- stackStartFn?: Function,
34
- ): never;
35
- function ok(value: any, message?: string | Error): asserts value;
36
- /** @deprecated since v9.9.0 - use strictEqual() instead. */
37
- function equal(actual: any, expected: any, message?: string | Error): void;
38
- /** @deprecated since v9.9.0 - use notStrictEqual() instead. */
39
- function notEqual(actual: any, expected: any, message?: string | Error): void;
40
- /** @deprecated since v9.9.0 - use deepStrictEqual() instead. */
41
- function deepEqual(actual: any, expected: any, message?: string | Error): void;
42
- /** @deprecated since v9.9.0 - use notDeepStrictEqual() instead. */
43
- function notDeepEqual(actual: any, expected: any, message?: string | Error): void;
44
- function strictEqual<T>(actual: any, expected: T, message?: string | Error): asserts actual is T;
45
- function notStrictEqual(actual: any, expected: any, message?: string | Error): void;
46
- function deepStrictEqual<T>(actual: any, expected: T, message?: string | Error): asserts actual is T;
47
- function notDeepStrictEqual(actual: any, expected: any, message?: string | Error): void;
48
-
49
- function throws(block: () => any, message?: string | Error): void;
50
- function throws(block: () => any, error: AssertPredicate, message?: string | Error): void;
51
- function doesNotThrow(block: () => any, message?: string | Error): void;
52
- function doesNotThrow(block: () => any, error: AssertPredicate, message?: string | Error): void;
53
-
54
- function ifError(value: any): asserts value is null | undefined;
55
-
56
- function rejects(block: (() => Promise<any>) | Promise<any>, message?: string | Error): Promise<void>;
57
- function rejects(
58
- block: (() => Promise<any>) | Promise<any>,
59
- error: AssertPredicate,
60
- message?: string | Error,
61
- ): Promise<void>;
62
- function doesNotReject(block: (() => Promise<any>) | Promise<any>, message?: string | Error): Promise<void>;
63
- function doesNotReject(
64
- block: (() => Promise<any>) | Promise<any>,
65
- error: AssertPredicate,
66
- message?: string | Error,
67
- ): Promise<void>;
68
-
69
- const strict: Omit<
70
- typeof assert,
71
- | 'equal'
72
- | 'notEqual'
73
- | 'deepEqual'
74
- | 'notDeepEqual'
75
- | 'ok'
76
- | 'strictEqual'
77
- | 'deepStrictEqual'
78
- | 'ifError'
79
- | 'strict'
80
- > & {
81
- (value: any, message?: string | Error): asserts value;
82
- equal: typeof strictEqual;
83
- notEqual: typeof notStrictEqual;
84
- deepEqual: typeof deepStrictEqual;
85
- notDeepEqual: typeof notDeepStrictEqual;
86
-
87
- // Mapped types and assertion functions are incompatible?
88
- // TS2775: Assertions require every name in the call target
89
- // to be declared with an explicit type annotation.
90
- ok: typeof ok;
91
- strictEqual: typeof strictEqual;
92
- deepStrictEqual: typeof deepStrictEqual;
93
- ifError: typeof ifError;
94
- strict: typeof strict;
95
- };
96
- }
97
-
98
- export = assert;
99
- }
node v11.15/domain.d.ts DELETED
@@ -1,16 +0,0 @@
1
- declare module 'domain' {
2
- import EventEmitter = require('events');
3
-
4
- class Domain extends EventEmitter implements NodeJS.Domain {
5
- run<T>(fn: (...args: any[]) => T, ...args: any[]): T;
6
- add(emitter: EventEmitter | NodeJS.Timer): void;
7
- remove(emitter: EventEmitter | NodeJS.Timer): void;
8
- bind<T extends Function>(cb: T): T;
9
- intercept<T extends Function>(cb: T): T;
10
- members: Array<EventEmitter | NodeJS.Timer>;
11
- enter(): void;
12
- exit(): void;
13
- }
14
-
15
- function create(): Domain;
16
- }
node v11.15/events.d.ts DELETED
@@ -1,30 +0,0 @@
1
- declare module 'events' {
2
- interface NodeEventTarget {
3
- once(event: string | symbol, listener: (...args: any[]) => void): this;
4
- }
5
-
6
- interface DOMEventTarget {
7
- addEventListener(event: string, listener: (...args: any[]) => void, opts?: { once: boolean }): any;
8
- }
9
-
10
- class EventEmitter extends NodeJS.EventEmitter {
11
- constructor();
12
-
13
- static once(emitter: NodeEventTarget, event: string | symbol): Promise<any[]>;
14
- static once(emitter: DOMEventTarget, event: string): Promise<any[]>;
15
-
16
- /** @deprecated since v4.0.0 */
17
- static listenerCount(emitter: NodeJS.EventEmitter, event: string | symbol): number;
18
-
19
- // TODO: This should be described using a static getter/setter pair:
20
- static defaultMaxListeners: number;
21
- }
22
-
23
- import internal = require('events');
24
- namespace EventEmitter {
25
- // Should just be `export { EventEmitter }`, but that doesn't work in TypeScript 3.4
26
- export { internal as EventEmitter };
27
- }
28
-
29
- export = EventEmitter;
30
- }
node v11.15/index.d.ts DELETED
@@ -1,43 +0,0 @@
1
- // Type definitions for non-npm package Node.js 11.15
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
- // Alvis HT Tang <https://github.com/alvis>
7
- // Andrew Makarov <https://github.com/r3nya>
8
- // Benjamin Toueg <https://github.com/btoueg>
9
- // Chigozirim C. <https://github.com/smac89>
10
- // David Junger <https://github.com/touffy>
11
- // Deividas Bakanas <https://github.com/DeividasBakanas>
12
- // Eugene Y. Q. Shen <https://github.com/eyqs>
13
- // Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>
14
- // Hoàng Văn Khải <https://github.com/KSXGitHub>
15
- // Huw <https://github.com/hoo29>
16
- // Kelvin Jin <https://github.com/kjin>
17
- // Klaus Meinhardt <https://github.com/ajafff>
18
- // Lishude <https://github.com/islishude>
19
- // Mariusz Wiktorczyk <https://github.com/mwiktorczyk>
20
- // Mohsen Azimi <https://github.com/mohsen1>
21
- // Nicolas Even <https://github.com/n-e>
22
- // Nikita Galkin <https://github.com/galkin>
23
- // Parambir Singh <https://github.com/parambirs>
24
- // Sebastian Silbermann <https://github.com/eps1lon>
25
- // Simon Schick <https://github.com/SimonSchick>
26
- // Thomas den Hollander <https://github.com/ThomasdenH>
27
- // Wilco Bakker <https://github.com/WilcoBakker>
28
- // wwwy3y3 <https://github.com/wwwy3y3>
29
- // Zane Hannan AU <https://github.com/ZaneHannanAU>
30
- // Jeremie Rodriguez <https://github.com/jeremiergz>
31
- // Samuel Ainsworth <https://github.com/samuela>
32
- // Kyle Uehlein <https://github.com/kuehlein>
33
- // Thanik Bhongbhibhat <https://github.com/bhongy>
34
- // Ivan Sieder <https://github.com/ivansieder>
35
- // Minh Son Nguyen <https://github.com/nguymin4>
36
- // ExE Boss <https://github.com/ExE-Boss>
37
- // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
38
-
39
- // NOTE: These definitions support NodeJS and TypeScript 3.7.
40
- // This isn't strictly needed since 3.7 has the assert module, but this way we're consistent.
41
- // Typically type modificatons should be made in base.d.ts instead of here
42
-
43
- /// <reference path="base.d.ts" />
@@ -1,68 +0,0 @@
1
- declare module "punycode" {
2
- /**
3
- * @deprecated since v7.0.0
4
- * The version of the punycode module bundled in Node.js is being deprecated.
5
- * In a future major version of Node.js this module will be removed.
6
- * Users currently depending on the punycode module should switch to using
7
- * the userland-provided Punycode.js module instead.
8
- */
9
- function decode(string: string): string;
10
- /**
11
- * @deprecated since v7.0.0
12
- * The version of the punycode module bundled in Node.js is being deprecated.
13
- * In a future major version of Node.js this module will be removed.
14
- * Users currently depending on the punycode module should switch to using
15
- * the userland-provided Punycode.js module instead.
16
- */
17
- function encode(string: string): string;
18
- /**
19
- * @deprecated since v7.0.0
20
- * The version of the punycode module bundled in Node.js is being deprecated.
21
- * In a future major version of Node.js this module will be removed.
22
- * Users currently depending on the punycode module should switch to using
23
- * the userland-provided Punycode.js module instead.
24
- */
25
- function toUnicode(domain: string): string;
26
- /**
27
- * @deprecated since v7.0.0
28
- * The version of the punycode module bundled in Node.js is being deprecated.
29
- * In a future major version of Node.js this module will be removed.
30
- * Users currently depending on the punycode module should switch to using
31
- * the userland-provided Punycode.js module instead.
32
- */
33
- function toASCII(domain: string): string;
34
- /**
35
- * @deprecated since v7.0.0
36
- * The version of the punycode module bundled in Node.js is being deprecated.
37
- * In a future major version of Node.js this module will be removed.
38
- * Users currently depending on the punycode module should switch to using
39
- * the userland-provided Punycode.js module instead.
40
- */
41
- const ucs2: ucs2;
42
- interface ucs2 {
43
- /**
44
- * @deprecated since v7.0.0
45
- * The version of the punycode module bundled in Node.js is being deprecated.
46
- * In a future major version of Node.js this module will be removed.
47
- * Users currently depending on the punycode module should switch to using
48
- * the userland-provided Punycode.js module instead.
49
- */
50
- decode(string: string): number[];
51
- /**
52
- * @deprecated since v7.0.0
53
- * The version of the punycode module bundled in Node.js is being deprecated.
54
- * In a future major version of Node.js this module will be removed.
55
- * Users currently depending on the punycode module should switch to using
56
- * the userland-provided Punycode.js module instead.
57
- */
58
- encode(codePoints: ReadonlyArray<number>): string;
59
- }
60
- /**
61
- * @deprecated since v7.0.0
62
- * The version of the punycode module bundled in Node.js is being deprecated.
63
- * In a future major version of Node.js this module will be removed.
64
- * Users currently depending on the punycode module should switch to using
65
- * the userland-provided Punycode.js module instead.
66
- */
67
- const version: string;
68
- }
@@ -1,54 +0,0 @@
1
- // NOTE: These definitions support NodeJS and TypeScript 3.2.
2
-
3
- // NOTE: TypeScript version-specific augmentations can be found in the following paths:
4
- // - ~/base.d.ts - Shared definitions common to all TypeScript versions
5
- // - ~/index.d.ts - Definitions specific to TypeScript 2.1
6
- // - ~/ts3.2/base.d.ts - Definitions specific to TypeScript 3.2
7
- // - ~/ts3.2/index.d.ts - Definitions specific to TypeScript 3.2 with assert pulled in
8
-
9
- // Reference required types from the default lib:
10
- /// <reference lib="es2018" />
11
- /// <reference lib="esnext.asynciterable" />
12
- /// <reference lib="esnext.intl" />
13
- /// <reference lib="esnext.bigint" />
14
-
15
- // Base definitions for all NodeJS modules that are not specific to any version of TypeScript:
16
- /// <reference path="../globals.d.ts" />
17
- /// <reference path="../async_hooks.d.ts" />
18
- /// <reference path="../buffer.d.ts" />
19
- /// <reference path="../child_process.d.ts" />
20
- /// <reference path="../cluster.d.ts" />
21
- /// <reference path="../console.d.ts" />
22
- /// <reference path="../constants.d.ts" />
23
- /// <reference path="../crypto.d.ts" />
24
- /// <reference path="../dgram.d.ts" />
25
- /// <reference path="../dns.d.ts" />
26
- /// <reference path="../domain.d.ts" />
27
- /// <reference path="../events.d.ts" />
28
- /// <reference path="../fs.d.ts" />
29
- /// <reference path="../http.d.ts" />
30
- /// <reference path="../http2.d.ts" />
31
- /// <reference path="../https.d.ts" />
32
- /// <reference path="../inspector.d.ts" />
33
- /// <reference path="../module.d.ts" />
34
- /// <reference path="../net.d.ts" />
35
- /// <reference path="../os.d.ts" />
36
- /// <reference path="../path.d.ts" />
37
- /// <reference path="../perf_hooks.d.ts" />
38
- /// <reference path="../process.d.ts" />
39
- /// <reference path="../punycode.d.ts" />
40
- /// <reference path="../querystring.d.ts" />
41
- /// <reference path="../readline.d.ts" />
42
- /// <reference path="../repl.d.ts" />
43
- /// <reference path="../stream.d.ts" />
44
- /// <reference path="../string_decoder.d.ts" />
45
- /// <reference path="../timers.d.ts" />
46
- /// <reference path="../tls.d.ts" />
47
- /// <reference path="../trace_events.d.ts" />
48
- /// <reference path="../tty.d.ts" />
49
- /// <reference path="../url.d.ts" />
50
- /// <reference path="../util.d.ts" />
51
- /// <reference path="../v8.d.ts" />
52
- /// <reference path="../vm.d.ts" />
53
- /// <reference path="../worker_threads.d.ts" />
54
- /// <reference path="../zlib.d.ts" />
@@ -1,6 +0,0 @@
1
- // NOTE: These definitions support NodeJS and TypeScript 3.2.
2
- // This is required to enable typing assert in ts3.7 without causing errors
3
- // Typically type modifiations should be made in base.d.ts instead of here
4
-
5
- /// <reference path="base.d.ts" />
6
- /// <reference path="assert.d.ts" />