@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,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "11.15.54",
3
+ "version": "12.0.0",
4
4
  "description": "TypeScript definitions for Node.js",
5
5
  "license": "MIT",
6
6
  "contributors": [
@@ -19,6 +19,11 @@
19
19
  "url": "https://github.com/jkomyno",
20
20
  "githubUsername": "jkomyno"
21
21
  },
22
+ {
23
+ "name": "Alexander T.",
24
+ "url": "https://github.com/a-tarasyuk",
25
+ "githubUsername": "a-tarasyuk"
26
+ },
22
27
  {
23
28
  "name": "Alvis HT Tang",
24
29
  "url": "https://github.com/alvis",
@@ -34,11 +39,21 @@
34
39
  "url": "https://github.com/btoueg",
35
40
  "githubUsername": "btoueg"
36
41
  },
42
+ {
43
+ "name": "Bruno Scheufler",
44
+ "url": "https://github.com/brunoscheufler",
45
+ "githubUsername": "brunoscheufler"
46
+ },
37
47
  {
38
48
  "name": "Chigozirim C.",
39
49
  "url": "https://github.com/smac89",
40
50
  "githubUsername": "smac89"
41
51
  },
52
+ {
53
+ "name": "Christian Vaagland Tellnes",
54
+ "url": "https://github.com/tellnes",
55
+ "githubUsername": "tellnes"
56
+ },
42
57
  {
43
58
  "name": "David Junger",
44
59
  "url": "https://github.com/touffy",
@@ -54,6 +69,11 @@
54
69
  "url": "https://github.com/eyqs",
55
70
  "githubUsername": "eyqs"
56
71
  },
72
+ {
73
+ "name": "Flarna",
74
+ "url": "https://github.com/Flarna",
75
+ "githubUsername": "Flarna"
76
+ },
57
77
  {
58
78
  "name": "Hannes Magnusson",
59
79
  "url": "https://github.com/Hannes-Magnusson-CK",
@@ -89,6 +109,11 @@
89
109
  "url": "https://github.com/mwiktorczyk",
90
110
  "githubUsername": "mwiktorczyk"
91
111
  },
112
+ {
113
+ "name": "Matthieu Sieben",
114
+ "url": "https://github.com/matthieusieben",
115
+ "githubUsername": "matthieusieben"
116
+ },
92
117
  {
93
118
  "name": "Mohsen Azimi",
94
119
  "url": "https://github.com/mohsen1",
@@ -100,9 +125,9 @@
100
125
  "githubUsername": "n-e"
101
126
  },
102
127
  {
103
- "name": "Nikita Galkin",
104
- "url": "https://github.com/galkin",
105
- "githubUsername": "galkin"
128
+ "name": "Nicolas Voigt",
129
+ "url": "https://github.com/octo-sniffle",
130
+ "githubUsername": "octo-sniffle"
106
131
  },
107
132
  {
108
133
  "name": "Parambir Singh",
@@ -154,33 +179,23 @@
154
179
  "url": "https://github.com/kuehlein",
155
180
  "githubUsername": "kuehlein"
156
181
  },
182
+ {
183
+ "name": "Jordi Oliveras Rovira",
184
+ "url": "https://github.com/j-oliveras",
185
+ "githubUsername": "j-oliveras"
186
+ },
157
187
  {
158
188
  "name": "Thanik Bhongbhibhat",
159
189
  "url": "https://github.com/bhongy",
160
190
  "githubUsername": "bhongy"
161
- },
162
- {
163
- "name": "Ivan Sieder",
164
- "url": "https://github.com/ivansieder",
165
- "githubUsername": "ivansieder"
166
- },
167
- {
168
- "name": "Minh Son Nguyen",
169
- "url": "https://github.com/nguymin4",
170
- "githubUsername": "nguymin4"
171
- },
172
- {
173
- "name": "ExE Boss",
174
- "url": "https://github.com/ExE-Boss",
175
- "githubUsername": "ExE-Boss"
176
191
  }
177
192
  ],
178
193
  "main": "",
179
- "types": "index.d.ts",
194
+ "types": "index",
180
195
  "typesVersions": {
181
- "<=3.6": {
196
+ ">=3.2.0-0": {
182
197
  "*": [
183
- "ts3.6/*"
198
+ "ts3.2/*"
184
199
  ]
185
200
  }
186
201
  },
@@ -191,6 +206,6 @@
191
206
  },
192
207
  "scripts": {},
193
208
  "dependencies": {},
194
- "typesPublisherContentHash": "277d2fc8966312ed17bba8ed454bb70b3e0355fe89105d75637d4430faf0c3f4",
195
- "typeScriptVersion": "3.5"
209
+ "typesPublisherContentHash": "4eca45525f4cc6529f254ae31cdb02a298b0671a32577f03dfb068fb52bd930f",
210
+ "typeScriptVersion": "2.0"
196
211
  }
File without changes
@@ -35,28 +35,64 @@ declare module "perf_hooks" {
35
35
  interface PerformanceNodeTiming extends PerformanceEntry {
36
36
  /**
37
37
  * The high resolution millisecond timestamp at which the Node.js process completed bootstrap.
38
- * If bootstrapping has not yet finished, the property has the value of -1.
39
38
  */
40
39
  readonly bootstrapComplete: number;
41
40
 
41
+ /**
42
+ * The high resolution millisecond timestamp at which cluster processing ended.
43
+ */
44
+ readonly clusterSetupEnd: number;
45
+
46
+ /**
47
+ * The high resolution millisecond timestamp at which cluster processing started.
48
+ */
49
+ readonly clusterSetupStart: number;
50
+
42
51
  /**
43
52
  * The high resolution millisecond timestamp at which the Node.js event loop exited.
44
- * If the event loop has not yet exited, the property has the value of -1.
45
- * It can only have a value of not -1 in a handler of the 'exit' event.
46
53
  */
47
54
  readonly loopExit: number;
48
55
 
49
56
  /**
50
57
  * The high resolution millisecond timestamp at which the Node.js event loop started.
51
- * If the event loop has not yet started (e.g., in the first tick of the main script), the property has the value of -1.
52
58
  */
53
59
  readonly loopStart: number;
54
60
 
61
+ /**
62
+ * The high resolution millisecond timestamp at which main module load ended.
63
+ */
64
+ readonly moduleLoadEnd: number;
65
+
66
+ /**
67
+ * The high resolution millisecond timestamp at which main module load started.
68
+ */
69
+ readonly moduleLoadStart: number;
70
+
55
71
  /**
56
72
  * The high resolution millisecond timestamp at which the Node.js process was initialized.
57
73
  */
58
74
  readonly nodeStart: number;
59
75
 
76
+ /**
77
+ * The high resolution millisecond timestamp at which preload module load ended.
78
+ */
79
+ readonly preloadModuleLoadEnd: number;
80
+
81
+ /**
82
+ * The high resolution millisecond timestamp at which preload module load started.
83
+ */
84
+ readonly preloadModuleLoadStart: number;
85
+
86
+ /**
87
+ * The high resolution millisecond timestamp at which third_party_main processing ended.
88
+ */
89
+ readonly thirdPartyMainEnd: number;
90
+
91
+ /**
92
+ * The high resolution millisecond timestamp at which third_party_main processing started.
93
+ */
94
+ readonly thirdPartyMainStart: number;
95
+
60
96
  /**
61
97
  * The high resolution millisecond timestamp at which the V8 platform was initialized.
62
98
  */
@@ -64,6 +100,13 @@ declare module "perf_hooks" {
64
100
  }
65
101
 
66
102
  interface Performance {
103
+ /**
104
+ * If name is not provided, removes all PerformanceFunction objects from the Performance Timeline.
105
+ * If name is provided, removes entries with name.
106
+ * @param name
107
+ */
108
+ clearFunctions(name?: string): void;
109
+
67
110
  /**
68
111
  * If name is not provided, removes all PerformanceMark objects from the Performance Timeline.
69
112
  * If name is provided, removes only the named mark.
@@ -71,6 +114,35 @@ declare module "perf_hooks" {
71
114
  */
72
115
  clearMarks(name?: string): void;
73
116
 
117
+ /**
118
+ * If name is not provided, removes all PerformanceMeasure objects from the Performance Timeline.
119
+ * If name is provided, removes only objects whose performanceEntry.name matches name.
120
+ */
121
+ clearMeasures(name?: string): void;
122
+
123
+ /**
124
+ * Returns a list of all PerformanceEntry objects in chronological order with respect to performanceEntry.startTime.
125
+ * @return list of all PerformanceEntry objects
126
+ */
127
+ getEntries(): PerformanceEntry[];
128
+
129
+ /**
130
+ * Returns a list of all PerformanceEntry objects in chronological order with respect to performanceEntry.startTime
131
+ * whose performanceEntry.name is equal to name, and optionally, whose performanceEntry.entryType is equal to type.
132
+ * @param name
133
+ * @param type
134
+ * @return list of all PerformanceEntry objects
135
+ */
136
+ getEntriesByName(name: string, type?: string): PerformanceEntry[];
137
+
138
+ /**
139
+ * Returns a list of all PerformanceEntry objects in chronological order with respect to performanceEntry.startTime
140
+ * whose performanceEntry.entryType is equal to type.
141
+ * @param type
142
+ * @return list of all PerformanceEntry objects
143
+ */
144
+ getEntriesByType(type: string): PerformanceEntry[];
145
+
74
146
  /**
75
147
  * Creates a new PerformanceMark entry in the Performance Timeline.
76
148
  * A PerformanceMark is a subclass of PerformanceEntry whose performanceEntry.entryType is always 'mark',
@@ -155,7 +227,7 @@ declare module "perf_hooks" {
155
227
  * Property buffered defaults to false.
156
228
  * @param options
157
229
  */
158
- observe(options: { entryTypes: ReadonlyArray<string>, buffered?: boolean }): void;
230
+ observe(options: { entryTypes: string[], buffered?: boolean }): void;
159
231
  }
160
232
 
161
233
  namespace constants {
File without changes
node/punycode.d.ts ADDED
@@ -0,0 +1,12 @@
1
+ declare module "punycode" {
2
+ function decode(string: string): string;
3
+ function encode(string: string): string;
4
+ function toUnicode(domain: string): string;
5
+ function toASCII(domain: string): string;
6
+ const ucs2: ucs2;
7
+ interface ucs2 {
8
+ decode(string: string): number[];
9
+ encode(codePoints: number[]): string;
10
+ }
11
+ const version: string;
12
+ }
@@ -11,19 +11,14 @@ declare module "querystring" {
11
11
  interface ParsedUrlQuery { [key: string]: string | string[]; }
12
12
 
13
13
  interface ParsedUrlQueryInput {
14
- [key: string]: unknown;
14
+ [key: string]:
15
+ // The value type here is a "poor man's `unknown`". When these types support TypeScript
16
+ // 3.0+, we can replace this with `unknown`.
17
+ {} | null | undefined;
15
18
  }
16
19
 
17
20
  function stringify(obj?: ParsedUrlQueryInput, sep?: string, eq?: string, options?: StringifyOptions): string;
18
21
  function parse(str: string, sep?: string, eq?: string, options?: ParseOptions): ParsedUrlQuery;
19
- /**
20
- * The querystring.encode() function is an alias for querystring.stringify().
21
- */
22
- const encode: typeof stringify;
23
- /**
24
- * The querystring.decode() function is an alias for querystring.parse().
25
- */
26
- const decode: typeof parse;
27
22
  function escape(str: string): string;
28
23
  function unescape(str: string): string;
29
24
  }
@@ -123,14 +123,13 @@ declare module "readline" {
123
123
  prompt?: string;
124
124
  crlfDelay?: number;
125
125
  removeHistoryDuplicates?: boolean;
126
- escapeCodeTimeout?: number;
127
126
  }
128
127
 
129
128
  function createInterface(input: NodeJS.ReadableStream, output?: NodeJS.WritableStream, completer?: Completer | AsyncCompleter, terminal?: boolean): Interface;
130
129
  function createInterface(options: ReadLineOptions): Interface;
131
130
 
132
131
  function cursorTo(stream: NodeJS.WritableStream, x: number, y?: number): void;
133
- function emitKeypressEvents(stream: NodeJS.ReadableStream, readlineInterface?: Interface): void;
132
+ function emitKeypressEvents(stream: NodeJS.ReadableStream, interface?: Interface): void;
134
133
  function moveCursor(stream: NodeJS.WritableStream, dx: number | string, dy: number | string): void;
135
134
  function clearLine(stream: NodeJS.WritableStream, dir: number): void;
136
135
  function clearScreenDown(stream: NodeJS.WritableStream): void;
@@ -6,17 +6,17 @@ declare module "repl" {
6
6
  interface ReplOptions {
7
7
  /**
8
8
  * The input prompt to display.
9
- * @default "> "
9
+ * Default: `"> "`
10
10
  */
11
11
  prompt?: string;
12
12
  /**
13
13
  * The `Readable` stream from which REPL input will be read.
14
- * @default process.stdin
14
+ * Default: `process.stdin`
15
15
  */
16
16
  input?: NodeJS.ReadableStream;
17
17
  /**
18
18
  * The `Writable` stream to which REPL output will be written.
19
- * @default process.stdout
19
+ * Default: `process.stdout`
20
20
  */
21
21
  output?: NodeJS.WritableStream;
22
22
  /**
@@ -130,22 +130,14 @@ declare module "repl" {
130
130
  * evaluation.
131
131
  */
132
132
  readonly context: Context;
133
- /**
134
- * Outdated alias for `input`.
135
- */
136
- readonly inputStream: NodeJS.ReadableStream;
137
- /**
138
- * Outdated alias for `output`.
139
- */
140
- readonly outputStream: NodeJS.WritableStream;
141
133
  /**
142
134
  * The `Readable` stream from which REPL input will be read.
143
135
  */
144
- readonly input: NodeJS.ReadableStream;
136
+ readonly inputStream: NodeJS.ReadableStream;
145
137
  /**
146
138
  * The `Writable` stream to which REPL output will be written.
147
139
  */
148
- readonly output: NodeJS.WritableStream;
140
+ readonly outputStream: NodeJS.WritableStream;
149
141
  /**
150
142
  * The commands registered via `replServer.defineCommand()`.
151
143
  */
@@ -1,7 +1,7 @@
1
- declare module 'stream' {
2
- import EventEmitter = require('events');
1
+ declare module "stream" {
2
+ import * as events from "events";
3
3
 
4
- class internal extends EventEmitter {
4
+ class internal extends events.EventEmitter {
5
5
  pipe<T extends NodeJS.WritableStream>(destination: T, options?: { end?: boolean; }): T;
6
6
  }
7
7
 
@@ -19,7 +19,6 @@ declare module 'stream' {
19
19
 
20
20
  class Readable extends Stream implements NodeJS.ReadableStream {
21
21
  readable: boolean;
22
- readonly readableFlowing: boolean | null;
23
22
  readonly readableHighWaterMark: number;
24
23
  readonly readableLength: number;
25
24
  constructor(opts?: ReadableOptions);
@@ -247,15 +246,9 @@ declare module 'stream' {
247
246
 
248
247
  class PassThrough extends Transform { }
249
248
 
250
- interface FinishedOptions {
251
- error?: boolean;
252
- readable?: boolean;
253
- writable?: boolean;
254
- }
255
- function finished(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, options: FinishedOptions, callback: (err?: NodeJS.ErrnoException | null) => void): () => void;
256
249
  function finished(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, callback: (err?: NodeJS.ErrnoException | null) => void): () => void;
257
250
  namespace finished {
258
- function __promisify__(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, options?: FinishedOptions): Promise<void>;
251
+ function __promisify__(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream): Promise<void>;
259
252
  }
260
253
 
261
254
  function pipeline<T extends NodeJS.WritableStream>(stream1: NodeJS.ReadableStream, stream2: T, callback?: (err: NodeJS.ErrnoException | null) => void): T;
@@ -275,10 +268,7 @@ declare module 'stream' {
275
268
  stream5: T,
276
269
  callback?: (err: NodeJS.ErrnoException | null) => void,
277
270
  ): T;
278
- function pipeline(
279
- streams: ReadonlyArray<NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream>,
280
- callback?: (err: NodeJS.ErrnoException | null) => void,
281
- ): NodeJS.WritableStream;
271
+ function pipeline(streams: Array<NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream>, callback?: (err: NodeJS.ErrnoException | null) => void): NodeJS.WritableStream;
282
272
  function pipeline(
283
273
  stream1: NodeJS.ReadableStream,
284
274
  stream2: NodeJS.ReadWriteStream | NodeJS.WritableStream,
@@ -295,7 +285,7 @@ declare module 'stream' {
295
285
  stream4: NodeJS.ReadWriteStream,
296
286
  stream5: NodeJS.WritableStream,
297
287
  ): Promise<void>;
298
- function __promisify__(streams: ReadonlyArray<NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream>): Promise<void>;
288
+ function __promisify__(streams: Array<NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream>): Promise<void>;
299
289
  function __promisify__(
300
290
  stream1: NodeJS.ReadableStream,
301
291
  stream2: NodeJS.ReadWriteStream | NodeJS.WritableStream,
File without changes
File without changes
@@ -44,7 +44,6 @@ declare module "tls" {
44
44
  valid_from: string;
45
45
  valid_to: string;
46
46
  fingerprint: string;
47
- fingerprint256: string;
48
47
  ext_key_usage: string[];
49
48
  serialNumber: string;
50
49
  raw: Buffer;
@@ -99,7 +98,7 @@ declare module "tls" {
99
98
  * An array of strings or a Buffer naming possible NPN protocols.
100
99
  * (Protocols should be ordered by their priority.)
101
100
  */
102
- NPNProtocols?: ReadonlyArray<string> | ReadonlyArray<Buffer> | ReadonlyArray<Uint8Array> | Buffer | Uint8Array,
101
+ NPNProtocols?: string[] | Buffer[] | Uint8Array[] | Buffer | Uint8Array,
103
102
  /**
104
103
  * An array of strings or a Buffer naming possible ALPN protocols.
105
104
  * (Protocols should be ordered by their priority.) When the server
@@ -107,7 +106,7 @@ declare module "tls" {
107
106
  * precedence over NPN and the server does not send an NPN extension
108
107
  * to the client.
109
108
  */
110
- ALPNProtocols?: ReadonlyArray<string> | ReadonlyArray<Buffer> | ReadonlyArray<Uint8Array> | Buffer | Uint8Array,
109
+ ALPNProtocols?: string[] | Buffer[] | Uint8Array[] | Buffer | Uint8Array,
111
110
  /**
112
111
  * SNICallback(servername, cb) <Function> A function that will be
113
112
  * called if the client supports SNI TLS extension. Two arguments
@@ -391,7 +390,7 @@ declare module "tls" {
391
390
  * @deprecated
392
391
  */
393
392
  function createSecurePair(credentials?: SecureContext, isServer?: boolean, requestCert?: boolean, rejectUnauthorized?: boolean): SecurePair;
394
- function createSecureContext(options?: SecureContextOptions): SecureContext;
393
+ function createSecureContext(details: SecureContextOptions): SecureContext;
395
394
  function getCiphers(): string[];
396
395
 
397
396
  const DEFAULT_ECDH_CURVE: string;
File without changes
@@ -0,0 +1,19 @@
1
+ // tslint:disable-next-line:no-bad-reference
2
+ /// <reference path="../globals.d.ts" />
3
+
4
+ declare namespace NodeJS {
5
+ interface HRTime {
6
+ bigint(): bigint;
7
+ }
8
+ }
9
+
10
+ interface Buffer extends Uint8Array {
11
+ readBigUInt64BE(offset?: number): bigint;
12
+ readBigUInt64LE(offset?: number): bigint;
13
+ readBigInt64BE(offset?: number): bigint;
14
+ readBigInt64LE(offset?: number): bigint;
15
+ writeBigInt64BE(value: bigint, offset?: number): number;
16
+ writeBigInt64LE(value: bigint, offset?: number): number;
17
+ writeBigUInt64BE(value: bigint, offset?: number): number;
18
+ writeBigUInt64LE(value: bigint, offset?: number): number;
19
+ }
@@ -1,10 +1,9 @@
1
- // NOTE: These definitions support NodeJS and TypeScript 3.7.
1
+ // NOTE: These definitions support NodeJS and TypeScript 3.2.
2
2
 
3
3
  // NOTE: TypeScript version-specific augmentations can be found in the following paths:
4
4
  // - ~/base.d.ts - Shared definitions common to all TypeScript versions
5
5
  // - ~/index.d.ts - Definitions specific to TypeScript 2.1
6
- // - ~/ts3.7/base.d.ts - Definitions specific to TypeScript 3.7
7
- // - ~/ts3.7/index.d.ts - Definitions specific to TypeScript 3.7 with assert pulled in
6
+ // - ~/ts3.2/index.d.ts - Definitions specific to TypeScript 3.2
8
7
 
9
8
  // Reference required types from the default lib:
10
9
  /// <reference lib="es2018" />
@@ -13,7 +12,9 @@
13
12
  /// <reference lib="esnext.bigint" />
14
13
 
15
14
  // Base definitions for all NodeJS modules that are not specific to any version of TypeScript:
16
- /// <reference path="ts3.6/base.d.ts" />
15
+ // tslint:disable-next-line:no-bad-reference
16
+ /// <reference path="../base.d.ts" />
17
17
 
18
- // TypeScript 3.7-specific augmentations:
19
- /// <reference path="assert.d.ts" />
18
+ // TypeScript 3.2-specific augmentations:
19
+ /// <reference path="util.d.ts" />
20
+ /// <reference path="globals.d.ts" />
node/ts3.2/util.d.ts ADDED
@@ -0,0 +1,15 @@
1
+ // tslint:disable-next-line:no-bad-reference
2
+ /// <reference path="../util.d.ts" />
3
+
4
+ declare module "util" {
5
+ namespace inspect {
6
+ const custom: unique symbol;
7
+ }
8
+ namespace promisify {
9
+ const custom: unique symbol;
10
+ }
11
+ namespace types {
12
+ function isBigInt64Array(value: any): value is BigInt64Array;
13
+ function isBigUint64Array(value: any): value is BigUint64Array;
14
+ }
15
+ }
@@ -3,7 +3,6 @@ declare module "tty" {
3
3
 
4
4
  function isatty(fd: number): boolean;
5
5
  class ReadStream extends net.Socket {
6
- constructor(fd: number, options?: net.SocketConstructorOpts);
7
6
  isRaw: boolean;
8
7
  setRawMode(mode: boolean): void;
9
8
  isTTY: boolean;
@@ -15,7 +14,6 @@ declare module "tty" {
15
14
  */
16
15
  type Direction = -1 | 0 | 1;
17
16
  class WriteStream extends net.Socket {
18
- constructor(fd: number);
19
17
  addListener(event: string, listener: (...args: any[]) => void): this;
20
18
  addListener(event: "resize", listener: () => void): this;
21
19
 
@@ -34,19 +34,13 @@ declare module "url" {
34
34
  query: string | null;
35
35
  }
36
36
 
37
- /** @deprecated since v11.0.0 - Use the WHATWG URL API. */
38
37
  function parse(urlStr: string): UrlWithStringQuery;
39
- /** @deprecated since v11.0.0 - Use the WHATWG URL API. */
40
38
  function parse(urlStr: string, parseQueryString: false | undefined, slashesDenoteHost?: boolean): UrlWithStringQuery;
41
- /** @deprecated since v11.0.0 - Use the WHATWG URL API. */
42
39
  function parse(urlStr: string, parseQueryString: true, slashesDenoteHost?: boolean): UrlWithParsedQuery;
43
- /** @deprecated since v11.0.0 - Use the WHATWG URL API. */
44
40
  function parse(urlStr: string, parseQueryString: boolean, slashesDenoteHost?: boolean): Url;
45
41
 
46
42
  function format(URL: URL, options?: URLFormatOptions): string;
47
- /** @deprecated since v11.0.0 - Use the WHATWG URL API. */
48
43
  function format(urlObject: UrlObject | string): string;
49
- /** @deprecated since v11.0.0 - Use the WHATWG URL API. */
50
44
  function resolve(from: string, to: string): string;
51
45
 
52
46
  function domainToASCII(domain: string): string;
@@ -92,7 +86,7 @@ declare module "url" {
92
86
  }
93
87
 
94
88
  class URLSearchParams implements Iterable<[string, string]> {
95
- constructor(init?: URLSearchParams | string | { [key: string]: string | ReadonlyArray<string> | undefined } | Iterable<[string, string]> | ReadonlyArray<[string, string]>);
89
+ constructor(init?: URLSearchParams | string | { [key: string]: string | string[] | undefined } | Iterable<[string, string]> | Array<[string, string]>);
96
90
  append(name: string, value: string): void;
97
91
  delete(name: string): void;
98
92
  entries(): IterableIterator<[string, string]>;