@types/node 13.7.6 → 13.9.2

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.
node/README.md CHANGED
@@ -8,9 +8,9 @@ This package contains type definitions for Node.js (http://nodejs.org/).
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Wed, 26 Feb 2020 00:51:03 GMT
11
+ * Last updated: Wed, 18 Mar 2020 21:14:29 GMT
12
12
  * Dependencies: none
13
13
  * Global values: `Buffer`, `Symbol`, `__dirname`, `__filename`, `clearImmediate`, `clearInterval`, `clearTimeout`, `console`, `exports`, `global`, `module`, `process`, `queueMicrotask`, `require`, `setImmediate`, `setInterval`, `setTimeout`
14
14
 
15
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), [Alexander T.](https://github.com/a-tarasyuk), [Alvis HT Tang](https://github.com/alvis), [Andrew Makarov](https://github.com/r3nya), [Benjamin Toueg](https://github.com/btoueg), [Bruno Scheufler](https://github.com/brunoscheufler), [Chigozirim C.](https://github.com/smac89), [Christian Vaagland Tellnes](https://github.com/tellnes), [David Junger](https://github.com/touffy), [Deividas Bakanas](https://github.com/DeividasBakanas), [Eugene Y. Q. Shen](https://github.com/eyqs), [Flarna](https://github.com/Flarna), [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), [Nicolas Voigt](https://github.com/octo-sniffle), [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), [Samuel Ainsworth](https://github.com/samuela), [Kyle Uehlein](https://github.com/kuehlein), [Jordi Oliveras Rovira](https://github.com/j-oliveras), [Thanik Bhongbhibhat](https://github.com/bhongy), [Marcin Kopacz](https://github.com/chyzwar), [Trivikram Kamat](https://github.com/trivikr), [Minh Son Nguyen](https://github.com/nguymin4), [Junxiao Shi](https://github.com/yoursunny), [Ilia Baryshnikov](https://github.com/qwelias), [ExE Boss](https://github.com/ExE-Boss), and [Surasak Chaisurin](https://github.com/Ryan-Willpower).
16
+ These definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [DefinitelyTyped](https://github.com/DefinitelyTyped), [Alberto Schiabel](https://github.com/jkomyno), [Alexander T.](https://github.com/a-tarasyuk), [Alvis HT Tang](https://github.com/alvis), [Andrew Makarov](https://github.com/r3nya), [Benjamin Toueg](https://github.com/btoueg), [Bruno Scheufler](https://github.com/brunoscheufler), [Chigozirim C.](https://github.com/smac89), [Christian Vaagland Tellnes](https://github.com/tellnes), [David Junger](https://github.com/touffy), [Deividas Bakanas](https://github.com/DeividasBakanas), [Eugene Y. Q. Shen](https://github.com/eyqs), [Flarna](https://github.com/Flarna), [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), [Nicolas Voigt](https://github.com/octo-sniffle), [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), [Samuel Ainsworth](https://github.com/samuela), [Kyle Uehlein](https://github.com/kuehlein), [Jordi Oliveras Rovira](https://github.com/j-oliveras), [Thanik Bhongbhibhat](https://github.com/bhongy), [Marcin Kopacz](https://github.com/chyzwar), [Trivikram Kamat](https://github.com/trivikr), [Minh Son Nguyen](https://github.com/nguymin4), [Junxiao Shi](https://github.com/yoursunny), [Ilia Baryshnikov](https://github.com/qwelias), [ExE Boss](https://github.com/ExE-Boss), [Surasak Chaisurin](https://github.com/Ryan-Willpower), and [Piotr Błażejewicz](https://github.com/peterblazejewicz).
node/async_hooks.d.ts CHANGED
@@ -7,6 +7,20 @@ declare module "async_hooks" {
7
7
  */
8
8
  function executionAsyncId(): number;
9
9
 
10
+ /**
11
+ * The resource representing the current execution.
12
+ * Useful to store data within the resource.
13
+ *
14
+ * Resource objects returned by `executionAsyncResource()` are most often internal
15
+ * Node.js handle objects with undocumented APIs. Using any functions or properties
16
+ * on the object is likely to crash your application and should be avoided.
17
+ *
18
+ * Using `executionAsyncResource()` in the top-level execution context will
19
+ * return an empty object as there is no handle or request object to use,
20
+ * but having an object representing the top-level can be helpful.
21
+ */
22
+ function executionAsyncResource(): object;
23
+
10
24
  /**
11
25
  * Returns the ID of the resource responsible for calling the callback that is currently being executed.
12
26
  */
node/child_process.d.ts CHANGED
@@ -21,7 +21,7 @@ declare module "child_process" {
21
21
  readonly killed: boolean;
22
22
  readonly pid: number;
23
23
  readonly connected: boolean;
24
- kill(signal?: NodeJS.Signals | number): void;
24
+ kill(signal?: NodeJS.Signals | number): boolean;
25
25
  send(message: Serializable, callback?: (error: Error | null) => void): boolean;
26
26
  send(message: Serializable, sendHandle?: SendHandle, callback?: (error: Error | null) => void): boolean;
27
27
  send(message: Serializable, sendHandle?: SendHandle, options?: MessageOptions, callback?: (error: Error | null) => void): boolean;
node/crypto.d.ts CHANGED
@@ -161,7 +161,7 @@ declare module "crypto" {
161
161
  asymmetricKeySize?: number;
162
162
  export(options: KeyExportOptions<'pem'>): string | Buffer;
163
163
  export(options?: KeyExportOptions<'der'>): Buffer;
164
- symmetricSize?: number;
164
+ symmetricKeySize?: number;
165
165
  type: KeyObjectType;
166
166
  }
167
167
 
node/globals.d.ts CHANGED
@@ -364,38 +364,38 @@ declare class Buffer extends Uint8Array {
364
364
  readUIntBE(offset: number, byteLength: number): number;
365
365
  readIntLE(offset: number, byteLength: number): number;
366
366
  readIntBE(offset: number, byteLength: number): number;
367
- readUInt8(offset: number): number;
368
- readUInt16LE(offset: number): number;
369
- readUInt16BE(offset: number): number;
370
- readUInt32LE(offset: number): number;
371
- readUInt32BE(offset: number): number;
372
- readInt8(offset: number): number;
373
- readInt16LE(offset: number): number;
374
- readInt16BE(offset: number): number;
375
- readInt32LE(offset: number): number;
376
- readInt32BE(offset: number): number;
377
- readFloatLE(offset: number): number;
378
- readFloatBE(offset: number): number;
379
- readDoubleLE(offset: number): number;
380
- readDoubleBE(offset: number): number;
367
+ readUInt8(offset?: number): number;
368
+ readUInt16LE(offset?: number): number;
369
+ readUInt16BE(offset?: number): number;
370
+ readUInt32LE(offset?: number): number;
371
+ readUInt32BE(offset?: number): number;
372
+ readInt8(offset?: number): number;
373
+ readInt16LE(offset?: number): number;
374
+ readInt16BE(offset?: number): number;
375
+ readInt32LE(offset?: number): number;
376
+ readInt32BE(offset?: number): number;
377
+ readFloatLE(offset?: number): number;
378
+ readFloatBE(offset?: number): number;
379
+ readDoubleLE(offset?: number): number;
380
+ readDoubleBE(offset?: number): number;
381
381
  reverse(): this;
382
382
  swap16(): Buffer;
383
383
  swap32(): Buffer;
384
384
  swap64(): Buffer;
385
- writeUInt8(value: number, offset: number): number;
386
- writeUInt16LE(value: number, offset: number): number;
387
- writeUInt16BE(value: number, offset: number): number;
388
- writeUInt32LE(value: number, offset: number): number;
389
- writeUInt32BE(value: number, offset: number): number;
390
- writeInt8(value: number, offset: number): number;
391
- writeInt16LE(value: number, offset: number): number;
392
- writeInt16BE(value: number, offset: number): number;
393
- writeInt32LE(value: number, offset: number): number;
394
- writeInt32BE(value: number, offset: number): number;
395
- writeFloatLE(value: number, offset: number): number;
396
- writeFloatBE(value: number, offset: number): number;
397
- writeDoubleLE(value: number, offset: number): number;
398
- writeDoubleBE(value: number, offset: number): number;
385
+ writeUInt8(value: number, offset?: number): number;
386
+ writeUInt16LE(value: number, offset?: number): number;
387
+ writeUInt16BE(value: number, offset?: number): number;
388
+ writeUInt32LE(value: number, offset?: number): number;
389
+ writeUInt32BE(value: number, offset?: number): number;
390
+ writeInt8(value: number, offset?: number): number;
391
+ writeInt16LE(value: number, offset?: number): number;
392
+ writeInt16BE(value: number, offset?: number): number;
393
+ writeInt32LE(value: number, offset?: number): number;
394
+ writeInt32BE(value: number, offset?: number): number;
395
+ writeFloatLE(value: number, offset?: number): number;
396
+ writeFloatBE(value: number, offset?: number): number;
397
+ writeDoubleLE(value: number, offset?: number): number;
398
+ writeDoubleBE(value: number, offset?: number): number;
399
399
 
400
400
  fill(value: string | Uint8Array | number, offset?: number, end?: number, encoding?: BufferEncoding): this;
401
401
 
@@ -606,6 +606,7 @@ declare namespace NodeJS {
606
606
  heapTotal: number;
607
607
  heapUsed: number;
608
608
  external: number;
609
+ arrayBuffers: number;
609
610
  }
610
611
 
611
612
  interface CpuUsage {
@@ -871,25 +872,13 @@ declare namespace NodeJS {
871
872
 
872
873
  resourceUsage(): ResourceUsage;
873
874
 
874
- /**
875
- * EventEmitter
876
- * 1. beforeExit
877
- * 2. disconnect
878
- * 3. exit
879
- * 4. message
880
- * 5. rejectionHandled
881
- * 6. uncaughtException
882
- * 7. unhandledRejection
883
- * 8. warning
884
- * 9. message
885
- * 10. <All OS Signals>
886
- * 11. newListener/removeListener inherited from EventEmitter
887
- */
875
+ /* EventEmitter */
888
876
  addListener(event: "beforeExit", listener: BeforeExitListener): this;
889
877
  addListener(event: "disconnect", listener: DisconnectListener): this;
890
878
  addListener(event: "exit", listener: ExitListener): this;
891
879
  addListener(event: "rejectionHandled", listener: RejectionHandledListener): this;
892
880
  addListener(event: "uncaughtException", listener: UncaughtExceptionListener): this;
881
+ addListener(event: "uncaughtExceptionMonitor", listener: UncaughtExceptionListener): this;
893
882
  addListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
894
883
  addListener(event: "warning", listener: WarningListener): this;
895
884
  addListener(event: "message", listener: MessageListener): this;
@@ -903,6 +892,7 @@ declare namespace NodeJS {
903
892
  emit(event: "exit", code: number): boolean;
904
893
  emit(event: "rejectionHandled", promise: Promise<any>): boolean;
905
894
  emit(event: "uncaughtException", error: Error): boolean;
895
+ emit(event: "uncaughtExceptionMonitor", error: Error): boolean;
906
896
  emit(event: "unhandledRejection", reason: any, promise: Promise<any>): boolean;
907
897
  emit(event: "warning", warning: Error): boolean;
908
898
  emit(event: "message", message: any, sendHandle: any): this;
@@ -916,6 +906,7 @@ declare namespace NodeJS {
916
906
  on(event: "exit", listener: ExitListener): this;
917
907
  on(event: "rejectionHandled", listener: RejectionHandledListener): this;
918
908
  on(event: "uncaughtException", listener: UncaughtExceptionListener): this;
909
+ on(event: "uncaughtExceptionMonitor", listener: UncaughtExceptionListener): this;
919
910
  on(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
920
911
  on(event: "warning", listener: WarningListener): this;
921
912
  on(event: "message", listener: MessageListener): this;
@@ -929,6 +920,7 @@ declare namespace NodeJS {
929
920
  once(event: "exit", listener: ExitListener): this;
930
921
  once(event: "rejectionHandled", listener: RejectionHandledListener): this;
931
922
  once(event: "uncaughtException", listener: UncaughtExceptionListener): this;
923
+ once(event: "uncaughtExceptionMonitor", listener: UncaughtExceptionListener): this;
932
924
  once(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
933
925
  once(event: "warning", listener: WarningListener): this;
934
926
  once(event: "message", listener: MessageListener): this;
@@ -942,6 +934,7 @@ declare namespace NodeJS {
942
934
  prependListener(event: "exit", listener: ExitListener): this;
943
935
  prependListener(event: "rejectionHandled", listener: RejectionHandledListener): this;
944
936
  prependListener(event: "uncaughtException", listener: UncaughtExceptionListener): this;
937
+ prependListener(event: "uncaughtExceptionMonitor", listener: UncaughtExceptionListener): this;
945
938
  prependListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
946
939
  prependListener(event: "warning", listener: WarningListener): this;
947
940
  prependListener(event: "message", listener: MessageListener): this;
@@ -955,6 +948,7 @@ declare namespace NodeJS {
955
948
  prependOnceListener(event: "exit", listener: ExitListener): this;
956
949
  prependOnceListener(event: "rejectionHandled", listener: RejectionHandledListener): this;
957
950
  prependOnceListener(event: "uncaughtException", listener: UncaughtExceptionListener): this;
951
+ prependOnceListener(event: "uncaughtExceptionMonitor", listener: UncaughtExceptionListener): this;
958
952
  prependOnceListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
959
953
  prependOnceListener(event: "warning", listener: WarningListener): this;
960
954
  prependOnceListener(event: "message", listener: MessageListener): this;
@@ -968,6 +962,7 @@ declare namespace NodeJS {
968
962
  listeners(event: "exit"): ExitListener[];
969
963
  listeners(event: "rejectionHandled"): RejectionHandledListener[];
970
964
  listeners(event: "uncaughtException"): UncaughtExceptionListener[];
965
+ listeners(event: "uncaughtExceptionMonitor"): UncaughtExceptionListener[];
971
966
  listeners(event: "unhandledRejection"): UnhandledRejectionListener[];
972
967
  listeners(event: "warning"): WarningListener[];
973
968
  listeners(event: "message"): MessageListener[];
node/http.d.ts CHANGED
@@ -103,6 +103,13 @@ declare module "http" {
103
103
  * @default 8192
104
104
  */
105
105
  maxHeaderSize?: number;
106
+ /**
107
+ * Use an insecure HTTP parser that accepts invalid HTTP headers when true.
108
+ * Using the insecure parser should be avoided.
109
+ * See --insecure-http-parser for more information.
110
+ * @default false
111
+ */
112
+ insecureHTTPParser?: boolean;
106
113
  }
107
114
 
108
115
  type RequestListener = (req: IncomingMessage, res: ServerResponse) => void;
node/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- // Type definitions for non-npm package Node.js 13.7
1
+ // Type definitions for non-npm package Node.js 13.9
2
2
  // Project: http://nodejs.org/
3
3
  // Definitions by: Microsoft TypeScript <https://github.com/Microsoft>
4
4
  // DefinitelyTyped <https://github.com/DefinitelyTyped>
@@ -43,6 +43,7 @@
43
43
  // Ilia Baryshnikov <https://github.com/qwelias>
44
44
  // ExE Boss <https://github.com/ExE-Boss>
45
45
  // Surasak Chaisurin <https://github.com/Ryan-Willpower>
46
+ // Piotr Błażejewicz <https://github.com/peterblazejewicz>
46
47
  // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
47
48
 
48
49
  // NOTE: These definitions support NodeJS and TypeScript 3.5.
node/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "13.7.6",
3
+ "version": "13.9.2",
4
4
  "description": "TypeScript definitions for Node.js",
5
5
  "license": "MIT",
6
6
  "contributors": [
@@ -218,6 +218,11 @@
218
218
  "name": "Surasak Chaisurin",
219
219
  "url": "https://github.com/Ryan-Willpower",
220
220
  "githubUsername": "Ryan-Willpower"
221
+ },
222
+ {
223
+ "name": "Piotr Błażejewicz",
224
+ "url": "https://github.com/peterblazejewicz",
225
+ "githubUsername": "peterblazejewicz"
221
226
  }
222
227
  ],
223
228
  "main": "",
@@ -241,6 +246,6 @@
241
246
  },
242
247
  "scripts": {},
243
248
  "dependencies": {},
244
- "typesPublisherContentHash": "bb38a150674fd521c03cf5319f1e01492d6763d5abbcae4390ac853ddcc6a4ac",
249
+ "typesPublisherContentHash": "29ad16649df1b4b6514c450e160725a42612bd5cbce73b5300e30895b8e48abc",
245
250
  "typeScriptVersion": "2.8"
246
251
  }
node/perf_hooks.d.ts CHANGED
@@ -27,11 +27,18 @@ declare module 'perf_hooks' {
27
27
  readonly entryType: EntryType;
28
28
 
29
29
  /**
30
- * When performanceEntry.entryType is equal to 'gc', the performance.kind property identifies
30
+ * When `performanceEntry.entryType` is equal to 'gc', `the performance.kind` property identifies
31
31
  * the type of garbage collection operation that occurred.
32
- * The value may be one of perf_hooks.constants.
32
+ * See perf_hooks.constants for valid values.
33
33
  */
34
34
  readonly kind?: number;
35
+
36
+ /**
37
+ * When `performanceEntry.entryType` is equal to 'gc', the `performance.flags`
38
+ * property contains additional information about garbage collection operation.
39
+ * See perf_hooks.constants for valid values.
40
+ */
41
+ readonly flags?: number;
35
42
  }
36
43
 
37
44
  interface PerformanceNodeTiming extends PerformanceEntry {
@@ -237,6 +244,14 @@ declare module 'perf_hooks' {
237
244
  const NODE_PERFORMANCE_GC_MINOR: number;
238
245
  const NODE_PERFORMANCE_GC_INCREMENTAL: number;
239
246
  const NODE_PERFORMANCE_GC_WEAKCB: number;
247
+
248
+ const NODE_PERFORMANCE_GC_FLAGS_NO: number;
249
+ const NODE_PERFORMANCE_GC_FLAGS_CONSTRUCT_RETAINED: number;
250
+ const NODE_PERFORMANCE_GC_FLAGS_FORCED: number;
251
+ const NODE_PERFORMANCE_GC_FLAGS_SYNCHRONOUS_PHANTOM_PROCESSING: number;
252
+ const NODE_PERFORMANCE_GC_FLAGS_ALL_AVAILABLE_GARBAGE: number;
253
+ const NODE_PERFORMANCE_GC_FLAGS_ALL_EXTERNAL_MEMORY: number;
254
+ const NODE_PERFORMANCE_GC_FLAGS_SCHEDULE_IDLE: number;
240
255
  }
241
256
 
242
257
  const performance: Performance;
node/readline.d.ts CHANGED
@@ -138,6 +138,7 @@ declare module "readline" {
138
138
  crlfDelay?: number;
139
139
  removeHistoryDuplicates?: boolean;
140
140
  escapeCodeTimeout?: number;
141
+ tabSize?: number;
141
142
  }
142
143
 
143
144
  function createInterface(input: NodeJS.ReadableStream, output?: NodeJS.WritableStream, completer?: Completer | AsyncCompleter, terminal?: boolean): Interface;
node/tty.d.ts CHANGED
@@ -5,7 +5,7 @@ declare module "tty" {
5
5
  class ReadStream extends net.Socket {
6
6
  constructor(fd: number, options?: net.SocketConstructorOpts);
7
7
  isRaw: boolean;
8
- setRawMode(mode: boolean): void;
8
+ setRawMode(mode: boolean): this;
9
9
  isTTY: boolean;
10
10
  }
11
11
  /**
node/worker_threads.d.ts CHANGED
@@ -117,6 +117,16 @@ declare module "worker_threads" {
117
117
  */
118
118
  receiveMessageOnPort(port: MessagePort): {} | undefined;
119
119
 
120
+ /**
121
+ * Returns a readable stream for a V8 snapshot of the current state of the Worker.
122
+ * See [`v8.getHeapSnapshot()`][] for more details.
123
+ *
124
+ * If the Worker thread is no longer running, which may occur before the
125
+ * [`'exit'` event][] is emitted, the returned `Promise` will be rejected
126
+ * immediately with an [`ERR_WORKER_NOT_RUNNING`][] error
127
+ */
128
+ getHeapSnapshot(): Promise<Readable>;
129
+
120
130
  addListener(event: "error", listener: (err: Error) => void): this;
121
131
  addListener(event: "exit", listener: (exitCode: number) => void): this;
122
132
  addListener(event: "message", listener: (value: any) => void): this;