@types/node 15.12.3 → 15.14.1

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 (57) hide show
  1. {node → node v15.14}/LICENSE +0 -0
  2. node/README.md → node v15.14/README.md +2 -2
  3. {node → node v15.14}/assert/strict.d.ts +0 -0
  4. {node → node v15.14}/assert.d.ts +0 -0
  5. {node → node v15.14}/async_hooks.d.ts +0 -0
  6. {node → node v15.14}/base.d.ts +0 -0
  7. node/buffer.d.ts → node v15.14/buffer.d.ts +28 -0
  8. node/child_process.d.ts → node v15.14/child_process.d.ts +12 -9
  9. {node → node v15.14}/cluster.d.ts +0 -0
  10. node/console.d.ts → node v15.14/console.d.ts +9 -9
  11. {node → node v15.14}/constants.d.ts +0 -0
  12. node/crypto.d.ts → node v15.14/crypto.d.ts +0 -2
  13. {node → node v15.14}/dgram.d.ts +0 -0
  14. {node → node v15.14}/diagnostic_channel.d.ts +0 -0
  15. {node → node v15.14}/dns/promises.d.ts +0 -0
  16. {node → node v15.14}/dns.d.ts +0 -0
  17. {node → node v15.14}/domain.d.ts +0 -0
  18. {node → node v15.14}/events.d.ts +0 -0
  19. node/fs/promises.d.ts → node v15.14/fs/promises.d.ts +6 -1
  20. {node → node v15.14}/fs.d.ts +0 -0
  21. node/globals.d.ts → node v15.14/globals.d.ts +5 -1
  22. {node → node v15.14}/globals.global.d.ts +0 -0
  23. node/http.d.ts → node v15.14/http.d.ts +5 -0
  24. {node → node v15.14}/http2.d.ts +0 -0
  25. {node → node v15.14}/https.d.ts +0 -0
  26. node/index.d.ts → node v15.14/index.d.ts +1 -1
  27. {node → node v15.14}/inspector.d.ts +0 -0
  28. {node → node v15.14}/module.d.ts +0 -0
  29. node/net.d.ts → node v15.14/net.d.ts +38 -0
  30. {node → node v15.14}/os.d.ts +0 -0
  31. node/package.json → node v15.14/package.json +2 -2
  32. {node → node v15.14}/path.d.ts +0 -0
  33. {node → node v15.14}/perf_hooks.d.ts +0 -0
  34. {node → node v15.14}/process.d.ts +0 -0
  35. {node → node v15.14}/punycode.d.ts +0 -0
  36. {node → node v15.14}/querystring.d.ts +0 -0
  37. {node → node v15.14}/readline.d.ts +0 -0
  38. {node → node v15.14}/repl.d.ts +0 -0
  39. {node → node v15.14}/stream/promises.d.ts +0 -0
  40. {node → node v15.14}/stream.d.ts +0 -0
  41. {node → node v15.14}/string_decoder.d.ts +0 -0
  42. {node → node v15.14}/timers/promises.d.ts +0 -0
  43. {node → node v15.14}/timers.d.ts +0 -0
  44. {node → node v15.14}/tls.d.ts +0 -0
  45. {node → node v15.14}/trace_events.d.ts +0 -0
  46. {node → node v15.14}/ts3.6/assert.d.ts +0 -0
  47. {node → node v15.14}/ts3.6/base.d.ts +0 -0
  48. {node → node v15.14}/ts3.6/index.d.ts +0 -0
  49. {node → node v15.14}/tty.d.ts +0 -0
  50. {node → node v15.14}/url.d.ts +0 -0
  51. {node → node v15.14}/util/types.d.ts +0 -0
  52. {node → node v15.14}/util.d.ts +0 -0
  53. {node → node v15.14}/v8.d.ts +0 -0
  54. {node → node v15.14}/vm.d.ts +0 -0
  55. {node → node v15.14}/wasi.d.ts +0 -0
  56. {node → node v15.14}/worker_threads.d.ts +0 -0
  57. {node → node v15.14}/zlib.d.ts +0 -0
File without changes
@@ -5,10 +5,10 @@
5
5
  This package contains type definitions for Node.js (http://nodejs.org/).
6
6
 
7
7
  # Details
8
- Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
8
+ Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node/v15.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Fri, 18 Jun 2021 09:31:14 GMT
11
+ * Last updated: Sat, 03 Jul 2021 00:31:28 GMT
12
12
  * Dependencies: none
13
13
  * Global values: `AbortController`, `AbortSignal`, `Buffer`, `__dirname`, `__filename`, `clearImmediate`, `clearInterval`, `clearTimeout`, `console`, `exports`, `global`, `module`, `process`, `queueMicrotask`, `require`, `setImmediate`, `setInterval`, `setTimeout`
14
14
 
File without changes
File without changes
File without changes
File without changes
@@ -77,6 +77,34 @@ declare module 'buffer' {
77
77
  */
78
78
  text(): Promise<string>;
79
79
  }
80
+
81
+ /**
82
+ * Decodes a string of Base64-encoded data into bytes, and encodes those bytes into a string using Latin-1 (ISO-8859-1).
83
+ *
84
+ * This function is only provided for compatibility with legacy web platform APIs
85
+ * and should never be used in new code, because they use strings to represent
86
+ * binary data and predate the introduction of typed arrays in JavaScript.
87
+ * For code running using Node.js APIs, converting between base64-encoded strings
88
+ * and binary data should be performed using `Buffer.from(str, 'base64')` and
89
+ * `buf.toString('base64')`.
90
+ *
91
+ * @deprecated dom compatibility
92
+ */
93
+ export function atob(input: string): string;
94
+
95
+ /**
96
+ * Decodes a string into bytes using Latin-1 (ISO-8859), and encodes those bytes into a string using Base64.
97
+ *
98
+ * This function is only provided for compatibility with legacy web platform APIs
99
+ * and should never be used in new code, because they use strings to represent
100
+ * binary data and predate the introduction of typed arrays in JavaScript.
101
+ * For code running using Node.js APIs, converting between base64-encoded strings
102
+ * and binary data should be performed using `Buffer.from(str, 'base64')` and
103
+ * `buf.toString('base64')`.
104
+ *
105
+ * @deprecated dom compatibility
106
+ */
107
+ export function btoa(input: string): string;
80
108
  }
81
109
 
82
110
  declare module 'node:buffer' {
@@ -147,6 +147,11 @@ declare module 'child_process' {
147
147
  * @default 'SIGTERM'
148
148
  */
149
149
  killSignal?: NodeJS.Signals | number;
150
+
151
+ /**
152
+ * In milliseconds the maximum amount of time the process is allowed to run.
153
+ */
154
+ timeout?: number;
150
155
  }
151
156
 
152
157
  interface ProcessEnvOptions {
@@ -483,14 +488,17 @@ declare module 'child_process' {
483
488
  function spawnSync(command: string, args?: ReadonlyArray<string>, options?: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns<Buffer>;
484
489
  function spawnSync(command: string, args?: ReadonlyArray<string>, options?: SpawnSyncOptions): SpawnSyncReturns<Buffer>;
485
490
 
486
- interface ExecSyncOptions extends CommonOptions {
487
- input?: string | Uint8Array;
491
+ interface CommonExecOptions extends ProcessEnvOptions {
492
+ input?: string | NodeJS.ArrayBufferView;
488
493
  stdio?: StdioOptions;
489
- shell?: string;
490
494
  killSignal?: NodeJS.Signals | number;
491
495
  maxBuffer?: number;
492
496
  encoding?: BufferEncoding | 'buffer' | null;
493
497
  }
498
+
499
+ interface ExecSyncOptions extends CommonExecOptions {
500
+ shell?: string;
501
+ }
494
502
  interface ExecSyncOptionsWithStringEncoding extends ExecSyncOptions {
495
503
  encoding: BufferEncoding;
496
504
  }
@@ -502,12 +510,7 @@ declare module 'child_process' {
502
510
  function execSync(command: string, options?: ExecSyncOptionsWithBufferEncoding): Buffer;
503
511
  function execSync(command: string, options?: ExecSyncOptions): Buffer;
504
512
 
505
- interface ExecFileSyncOptions extends CommonOptions {
506
- input?: string | NodeJS.ArrayBufferView;
507
- stdio?: StdioOptions;
508
- killSignal?: NodeJS.Signals | number;
509
- maxBuffer?: number;
510
- encoding?: BufferEncoding;
513
+ interface ExecFileSyncOptions extends CommonExecOptions {
511
514
  shell?: boolean | string;
512
515
  }
513
516
  interface ExecFileSyncOptionsWithStringEncoding extends ExecFileSyncOptions {
File without changes
@@ -25,16 +25,16 @@ declare module 'console' {
25
25
  */
26
26
  countReset(label?: string): void;
27
27
  /**
28
- * The `console.debug()` function is an alias for {@link console.log}.
28
+ * The `console.debug()` function is an alias for {@link console.log()}.
29
29
  */
30
30
  debug(message?: any, ...optionalParams: any[]): void;
31
31
  /**
32
- * Uses {@link util.inspect} on `obj` and prints the resulting string to `stdout`.
32
+ * Uses {@link util.inspect()} on `obj` and prints the resulting string to `stdout`.
33
33
  * This function bypasses any custom `inspect()` function defined on `obj`.
34
34
  */
35
35
  dir(obj: any, options?: InspectOptions): void;
36
36
  /**
37
- * This method calls {@link console.log} passing it the arguments received. Please note that this method does not produce any XML formatting
37
+ * This method calls {@link console.log()} passing it the arguments received. Please note that this method does not produce any XML formatting
38
38
  */
39
39
  dirxml(...data: any[]): void;
40
40
  /**
@@ -47,7 +47,7 @@ declare module 'console' {
47
47
  */
48
48
  group(...label: any[]): void;
49
49
  /**
50
- * The `console.groupCollapsed()` function is an alias for {@link console.group}.
50
+ * The `console.groupCollapsed()` function is an alias for {@link console.group()}.
51
51
  */
52
52
  groupCollapsed(...label: any[]): void;
53
53
  /**
@@ -55,7 +55,7 @@ declare module 'console' {
55
55
  */
56
56
  groupEnd(): void;
57
57
  /**
58
- * The {@link console.info} function is an alias for {@link console.log}.
58
+ * The {@link console.info()} function is an alias for {@link console.log()}.
59
59
  */
60
60
  info(message?: any, ...optionalParams: any[]): void;
61
61
  /**
@@ -72,19 +72,19 @@ declare module 'console' {
72
72
  */
73
73
  time(label?: string): void;
74
74
  /**
75
- * Stops a timer that was previously started by calling {@link console.time} and prints the result to `stdout`.
75
+ * Stops a timer that was previously started by calling {@link console.time()} and prints the result to `stdout`.
76
76
  */
77
77
  timeEnd(label?: string): void;
78
78
  /**
79
- * For a timer that was previously started by calling {@link console.time}, prints the elapsed time and other `data` arguments to `stdout`.
79
+ * For a timer that was previously started by calling {@link console.time()}, prints the elapsed time and other `data` arguments to `stdout`.
80
80
  */
81
81
  timeLog(label?: string, ...data: any[]): void;
82
82
  /**
83
- * Prints to `stderr` the string 'Trace :', followed by the {@link util.format} formatted message and stack trace to the current position in the code.
83
+ * Prints to `stderr` the string 'Trace :', followed by the {@link util.format()} formatted message and stack trace to the current position in the code.
84
84
  */
85
85
  trace(message?: any, ...optionalParams: any[]): void;
86
86
  /**
87
- * The {@link console.warn} function is an alias for {@link console.error}.
87
+ * The {@link console.warn()} function is an alias for {@link console.error()}.
88
88
  */
89
89
  warn(message?: any, ...optionalParams: any[]): void;
90
90
 
File without changes
@@ -376,8 +376,6 @@ declare module 'crypto' {
376
376
  type?: 'pkcs1' | 'spki';
377
377
  }
378
378
 
379
- function generateKey(type: 'hmac' | 'aes', options: {length: number}, callback: (err: Error | null, key: KeyObject) => void): KeyObject;
380
-
381
379
  function createPrivateKey(key: PrivateKeyInput | string | Buffer): KeyObject;
382
380
  function createPublicKey(key: PublicKeyInput | string | Buffer | KeyObject): KeyObject;
383
381
  function createSecretKey(key: NodeJS.ArrayBufferView): KeyObject;
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1,5 +1,6 @@
1
1
  declare module 'fs/promises' {
2
2
  import { Abortable } from 'events';
3
+ import { Stream } from 'stream';
3
4
  import {
4
5
  Stats,
5
6
  BigIntStats,
@@ -512,7 +513,11 @@ declare module 'fs/promises' {
512
513
  * If `mode` is a string, it is parsed as an octal integer.
513
514
  * If `flag` is not supplied, the default of `'w'` is used.
514
515
  */
515
- function writeFile(path: PathLike | FileHandle, data: string | Uint8Array, options?: BaseEncodingOptions & { mode?: Mode, flag?: OpenMode } & Abortable | BufferEncoding | null): Promise<void>;
516
+ function writeFile(
517
+ path: PathLike | FileHandle,
518
+ data: string | NodeJS.ArrayBufferView | Iterable<string | NodeJS.ArrayBufferView> | AsyncIterable<string | NodeJS.ArrayBufferView> | Stream,
519
+ options?: BaseEncodingOptions & { mode?: Mode, flag?: OpenMode } & Abortable | BufferEncoding | null
520
+ ): Promise<void>;
516
521
 
517
522
  /**
518
523
  * Asynchronously append data to a file, creating the file if it does not exist.
File without changes
@@ -332,6 +332,11 @@ interface AbortSignal {
332
332
  * Returns true if this AbortSignal's AbortController has signaled to abort, and false otherwise.
333
333
  */
334
334
  readonly aborted: boolean;
335
+
336
+ /**
337
+ * Invoking this method will set this object's AbortSignal's aborted flag and signal to any observers that the associated activity is to be aborted.
338
+ */
339
+ abort(): void;
335
340
  }
336
341
 
337
342
  declare var AbortController: {
@@ -342,7 +347,6 @@ declare var AbortController: {
342
347
  declare var AbortSignal: {
343
348
  prototype: AbortSignal;
344
349
  new(): AbortSignal;
345
- // TODO: Add abort() static
346
350
  };
347
351
  //#endregion borrowed
348
352
 
File without changes
@@ -229,6 +229,11 @@ declare module 'http' {
229
229
  setTimeout(timeout: number, callback?: () => void): this;
230
230
  setNoDelay(noDelay?: boolean): void;
231
231
  setSocketKeepAlive(enable?: boolean, initialDelay?: number): void;
232
+ /**
233
+ * Returns an array containing the unique names of the current outgoing raw headers.
234
+ * Header names are returned with their exact casing being set.
235
+ */
236
+ getRawHeaderNames(): string[];
232
237
 
233
238
  addListener(event: 'abort', listener: () => void): this;
234
239
  addListener(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
File without changes
File without changes
@@ -1,4 +1,4 @@
1
- // Type definitions for non-npm package Node.js 15.12
1
+ // Type definitions for non-npm package Node.js 15.14
2
2
  // Project: http://nodejs.org/
3
3
  // Definitions by: Microsoft TypeScript <https://github.com/Microsoft>
4
4
  // DefinitelyTyped <https://github.com/DefinitelyTyped>
File without changes
File without changes
@@ -273,6 +273,7 @@ declare module 'net' {
273
273
  * @param type Either 'ipv4' or 'ipv6'. Default: 'ipv4'.
274
274
  */
275
275
  addAddress(address: string, type?: IPVersion): void;
276
+ addAddress(address: SocketAddress): void;
276
277
 
277
278
  /**
278
279
  * Adds a rule to block a range of IP addresses from start (inclusive) to end (inclusive).
@@ -282,6 +283,7 @@ declare module 'net' {
282
283
  * @param type Either 'ipv4' or 'ipv6'. Default: 'ipv4'.
283
284
  */
284
285
  addRange(start: string, end: string, type?: IPVersion): void;
286
+ addRange(start: SocketAddress, end: SocketAddress): void;
285
287
 
286
288
  /**
287
289
  * Adds a rule to block a range of IP addresses specified as a subnet mask.
@@ -291,6 +293,7 @@ declare module 'net' {
291
293
  * For IPv4, this must be a value between 0 and 32. For IPv6, this must be between 0 and 128.
292
294
  * @param type Either 'ipv4' or 'ipv6'. Default: 'ipv4'.
293
295
  */
296
+ addSubnet(net: SocketAddress, prefix: number): void;
294
297
  addSubnet(net: string, prefix: number, type?: IPVersion): void;
295
298
 
296
299
  /**
@@ -299,6 +302,7 @@ declare module 'net' {
299
302
  * @param address The IP address to check
300
303
  * @param type Either 'ipv4' or 'ipv6'. Default: 'ipv4'.
301
304
  */
305
+ check(address: SocketAddress): boolean;
302
306
  check(address: string, type?: IPVersion): boolean;
303
307
  }
304
308
 
@@ -323,4 +327,38 @@ declare module 'net' {
323
327
  function isIP(input: string): number;
324
328
  function isIPv4(input: string): boolean;
325
329
  function isIPv6(input: string): boolean;
330
+
331
+ interface SocketAddressInitOptions {
332
+ /**
333
+ * The network address as either an IPv4 or IPv6 string.
334
+ * @default 127.0.0.1
335
+ */
336
+ address?: string;
337
+ /**
338
+ * @default `'ipv4'`
339
+ */
340
+ family?: IPVersion;
341
+ /**
342
+ * An IPv6 flow-label used only if `family` is `'ipv6'`.
343
+ * @default 0
344
+ */
345
+ flowlabel?: number;
346
+ /**
347
+ * An IP port.
348
+ * @default 0
349
+ */
350
+ port?: number;
351
+ }
352
+
353
+ // TODO: Mark as clonable if `kClone` symbol is set in node.
354
+ /**
355
+ * Immutable socket address.
356
+ */
357
+ class SocketAddress {
358
+ constructor(options: SocketAddressInitOptions);
359
+ readonly address: string;
360
+ readonly family: IPVersion;
361
+ readonly port: number;
362
+ readonly flowlabel: number;
363
+ }
326
364
  }
File without changes
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "15.12.3",
3
+ "version": "15.14.1",
4
4
  "description": "TypeScript definitions for Node.js",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
6
  "license": "MIT",
@@ -227,6 +227,6 @@
227
227
  },
228
228
  "scripts": {},
229
229
  "dependencies": {},
230
- "typesPublisherContentHash": "7d407772fe9c0edcbff7320cf0827e14396d3a734e2205f9ee6b37dc8ff8a33f",
230
+ "typesPublisherContentHash": "36f4b12e20bfd803c3928a80a92d9f84669d669379b13fae76dd876731392a68",
231
231
  "typeScriptVersion": "3.6"
232
232
  }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes