@types/node 13.13.50 → 14.0.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 (61) hide show
  1. {node v13.13 → node}/LICENSE +0 -0
  2. node/README.md +16 -0
  3. node v13.13/ts3.6/assert.d.ts → node/assert.d.ts +8 -27
  4. node v13.13/async_hooks.d.ts → node/async_hooks.d.ts +1 -29
  5. node/base.d.ts +41 -0
  6. {node v13.13 → node}/buffer.d.ts +0 -0
  7. node v13.13/child_process.d.ts → node/child_process.d.ts +28 -28
  8. {node v13.13 → node}/cluster.d.ts +0 -0
  9. {node v13.13 → node}/console.d.ts +0 -0
  10. {node v13.13 → node}/constants.d.ts +0 -0
  11. node v13.13/crypto.d.ts → node/crypto.d.ts +83 -287
  12. node v13.13/dgram.d.ts → node/dgram.d.ts +3 -3
  13. {node v13.13 → node}/dns.d.ts +0 -0
  14. node v13.13/domain.d.ts → node/domain.d.ts +2 -2
  15. node v13.13/events.d.ts → node/events.d.ts +17 -22
  16. node/fs/promises.d.ts +539 -0
  17. node v13.13/fs.d.ts → node/fs.d.ts +272 -820
  18. node v13.13/globals.d.ts → node/globals.d.ts +15 -94
  19. node v13.13/http.d.ts → node/http.d.ts +4 -11
  20. node v13.13/http2.d.ts → node/http2.d.ts +6 -6
  21. {node v13.13 → node}/https.d.ts +0 -0
  22. node v13.13/index.d.ts → node/index.d.ts +44 -5
  23. node v13.13/inspector.d.ts → node/inspector.d.ts +7 -0
  24. node v13.13/module.d.ts → node/module.d.ts +0 -6
  25. node v13.13/net.d.ts → node/net.d.ts +3 -3
  26. node v13.13/os.d.ts → node/os.d.ts +1 -1
  27. node v13.13/package.json → node/package.json +35 -10
  28. {node v13.13 → node}/path.d.ts +0 -0
  29. node v13.13/perf_hooks.d.ts → node/perf_hooks.d.ts +74 -8
  30. {node v13.13 → node}/process.d.ts +0 -0
  31. node/punycode.d.ts +12 -0
  32. {node v13.13 → node}/querystring.d.ts +0 -0
  33. {node v13.13 → node}/readline.d.ts +0 -0
  34. node v13.13/repl.d.ts → node/repl.d.ts +2 -10
  35. node v13.13/stream.d.ts → node/stream.d.ts +27 -33
  36. node v13.13/string_decoder.d.ts → node/string_decoder.d.ts +1 -1
  37. {node v13.13 → node}/timers.d.ts +0 -0
  38. node v13.13/tls.d.ts → node/tls.d.ts +2 -2
  39. {node v13.13 → node}/trace_events.d.ts +0 -0
  40. node/ts3.2/base.d.ts +22 -0
  41. node/ts3.2/fs.d.ts +33 -0
  42. node/ts3.2/globals.d.ts +19 -0
  43. node/ts3.2/index.d.ts +8 -0
  44. node/ts3.2/util.d.ts +9 -0
  45. node/ts3.5/base.d.ts +20 -0
  46. node v13.13/ts3.6/index.d.ts → node/ts3.5/index.d.ts +4 -2
  47. node v13.13/wasi.d.ts → node/ts3.5/wasi.d.ts +1 -4
  48. node v13.13/assert.d.ts → node/ts3.7/assert.d.ts +9 -54
  49. node v13.13/base.d.ts → node/ts3.7/base.d.ts +2 -1
  50. node/ts3.7/index.d.ts +5 -0
  51. {node v13.13 → node}/tty.d.ts +0 -0
  52. node v13.13/url.d.ts → node/url.d.ts +1 -7
  53. node v13.13/util.d.ts → node/util.d.ts +14 -30
  54. {node v13.13 → node}/v8.d.ts +0 -0
  55. node v13.13/vm.d.ts → node/vm.d.ts +1 -3
  56. node v13.13/worker_threads.d.ts → node/worker_threads.d.ts +3 -21
  57. node v13.13/zlib.d.ts → node/zlib.d.ts +0 -1
  58. node v13.13/README.md +0 -16
  59. node v13.13/globals.global.d.ts +0 -1
  60. node v13.13/punycode.d.ts +0 -68
  61. node v13.13/ts3.6/base.d.ts +0 -60
File without changes
node/README.md ADDED
@@ -0,0 +1,16 @@
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.
9
+
10
+ ### Additional Details
11
+ * Last updated: Wed, 13 May 2020 00:31:42 GMT
12
+ * Dependencies: none
13
+ * Global values: `Buffer`, `Symbol`, `__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), [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), [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).
@@ -1,4 +1,4 @@
1
- declare module 'assert' {
1
+ declare module "assert" {
2
2
  function assert(value: any, message?: string | Error): void;
3
3
  namespace assert {
4
4
  class AssertionError implements Error {
@@ -11,27 +11,16 @@ declare module 'assert' {
11
11
  code: 'ERR_ASSERTION';
12
12
 
13
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;
14
+ message?: string; actual?: any; expected?: any;
15
+ operator?: string; stackStartFn?: Function
20
16
  });
21
17
  }
22
18
 
23
- type AssertPredicate = RegExp | (new () => object) | ((thrown: any) => boolean) | object | Error;
19
+ type AssertPredicate = RegExp | (new() => object) | ((thrown: any) => boolean) | object | Error;
24
20
 
25
21
  function fail(message?: string | Error): never;
26
22
  /** @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;
23
+ function fail(actual: any, expected: any, message?: string | Error, operator?: string, stackStartFn?: Function): never;
35
24
  function ok(value: any, message?: string | Error): void;
36
25
  /** @deprecated since v9.9.0 - use strictEqual() instead. */
37
26
  function equal(actual: any, expected: any, message?: string | Error): void;
@@ -49,22 +38,14 @@ declare module 'assert' {
49
38
  function throws(block: () => any, message?: string | Error): void;
50
39
  function throws(block: () => any, error: AssertPredicate, message?: string | Error): void;
51
40
  function doesNotThrow(block: () => any, message?: string | Error): void;
52
- function doesNotThrow(block: () => any, error: AssertPredicate, message?: string | Error): void;
41
+ function doesNotThrow(block: () => any, error: RegExp | Function, message?: string | Error): void;
53
42
 
54
43
  function ifError(value: any): void;
55
44
 
56
45
  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>;
46
+ function rejects(block: (() => Promise<any>) | Promise<any>, error: AssertPredicate, message?: string | Error): Promise<void>;
62
47
  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>;
48
+ function doesNotReject(block: (() => Promise<any>) | Promise<any>, error: RegExp | Function, message?: string | Error): Promise<void>;
68
49
 
69
50
  function match(value: string, regExp: RegExp, message?: string | Error): void;
70
51
  function doesNotMatch(value: string, regExp: RegExp, message?: string | Error): void;
@@ -131,7 +131,7 @@ declare module "async_hooks" {
131
131
  /**
132
132
  * Call AsyncHooks destroy callbacks.
133
133
  */
134
- emitDestroy(): this;
134
+ emitDestroy(): void;
135
135
 
136
136
  /**
137
137
  * @return the unique ID assigned to this AsyncResource instance.
@@ -209,34 +209,6 @@ declare module "async_hooks" {
209
209
  */
210
210
  exit(callback: (...args: any[]) => void, ...args: any[]): void;
211
211
 
212
- /**
213
- * This methods runs a function synchronously within a context and return its
214
- * return value. The store is not accessible outside of the callback function or
215
- * the asynchronous operations created within the callback.
216
- *
217
- * Optionally, arguments can be passed to the function. They will be passed to
218
- * the callback function.
219
- *
220
- * If the callback function throws an error, it will be thrown by
221
- * `runSyncAndReturn` too. The stacktrace will not be impacted by this call and
222
- * the context will be exited.
223
- */
224
- runSyncAndReturn<R>(store: T, callback: (...args: any[]) => R, ...args: any[]): R;
225
-
226
- /**
227
- * This methods runs a function synchronously outside of a context and return its
228
- * return value. The store is not accessible within the callback function or
229
- * the asynchronous operations created within the callback.
230
- *
231
- * Optionally, arguments can be passed to the function. They will be passed to
232
- * the callback function.
233
- *
234
- * If the callback function throws an error, it will be thrown by
235
- * `exitSyncAndReturn` too. The stacktrace will not be impacted by this call and
236
- * the context will be re-entered.
237
- */
238
- exitSyncAndReturn<R>(callback: (...args: any[]) => R, ...args: any[]): R;
239
-
240
212
  /**
241
213
  * Calling `asyncLocalStorage.enterWith(store)` will transition into the context
242
214
  * for the remainder of the current synchronous execution and will persist
node/base.d.ts ADDED
@@ -0,0 +1,41 @@
1
+ // base definnitions for all NodeJS modules that are not specific to any version of TypeScript
2
+ /// <reference path="globals.d.ts" />
3
+ /// <reference path="async_hooks.d.ts" />
4
+ /// <reference path="buffer.d.ts" />
5
+ /// <reference path="child_process.d.ts" />
6
+ /// <reference path="cluster.d.ts" />
7
+ /// <reference path="console.d.ts" />
8
+ /// <reference path="constants.d.ts" />
9
+ /// <reference path="crypto.d.ts" />
10
+ /// <reference path="dgram.d.ts" />
11
+ /// <reference path="dns.d.ts" />
12
+ /// <reference path="domain.d.ts" />
13
+ /// <reference path="events.d.ts" />
14
+ /// <reference path="fs.d.ts" />
15
+ /// <reference path="fs/promises.d.ts" />
16
+ /// <reference path="http.d.ts" />
17
+ /// <reference path="http2.d.ts" />
18
+ /// <reference path="https.d.ts" />
19
+ /// <reference path="inspector.d.ts" />
20
+ /// <reference path="module.d.ts" />
21
+ /// <reference path="net.d.ts" />
22
+ /// <reference path="os.d.ts" />
23
+ /// <reference path="path.d.ts" />
24
+ /// <reference path="perf_hooks.d.ts" />
25
+ /// <reference path="process.d.ts" />
26
+ /// <reference path="punycode.d.ts" />
27
+ /// <reference path="querystring.d.ts" />
28
+ /// <reference path="readline.d.ts" />
29
+ /// <reference path="repl.d.ts" />
30
+ /// <reference path="stream.d.ts" />
31
+ /// <reference path="string_decoder.d.ts" />
32
+ /// <reference path="timers.d.ts" />
33
+ /// <reference path="tls.d.ts" />
34
+ /// <reference path="trace_events.d.ts" />
35
+ /// <reference path="tty.d.ts" />
36
+ /// <reference path="url.d.ts" />
37
+ /// <reference path="util.d.ts" />
38
+ /// <reference path="v8.d.ts" />
39
+ /// <reference path="vm.d.ts" />
40
+ /// <reference path="worker_threads.d.ts" />
41
+ /// <reference path="zlib.d.ts" />
File without changes
@@ -1,4 +1,5 @@
1
1
  declare module "child_process" {
2
+ import { BaseEncodingOptions } from 'fs';
2
3
  import * as events from "events";
3
4
  import * as net from "net";
4
5
  import { Writable, Readable, Stream, Pipe } from "stream";
@@ -272,7 +273,7 @@ declare module "child_process" {
272
273
  }
273
274
 
274
275
  interface ExecOptionsWithBufferEncoding extends ExecOptions {
275
- encoding: string | null; // specify `null`.
276
+ encoding: BufferEncoding | null; // specify `null`.
276
277
  }
277
278
 
278
279
  interface ExecException extends Error {
@@ -293,7 +294,11 @@ declare module "child_process" {
293
294
 
294
295
  // `options` with an `encoding` whose type is `string` means stdout/stderr could either be `Buffer` or `string`.
295
296
  // There is no guarantee the `encoding` is unknown as `string` is a superset of `BufferEncoding`.
296
- function exec(command: string, options: { encoding: string } & ExecOptions, callback?: (error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void): ChildProcess;
297
+ function exec(
298
+ command: string,
299
+ options: { encoding: BufferEncoding } & ExecOptions,
300
+ callback?: (error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void,
301
+ ): ChildProcess;
297
302
 
298
303
  // `options` without an `encoding` means stdout/stderr are definitely `string`.
299
304
  function exec(command: string, options: ExecOptions, callback?: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess;
@@ -301,7 +306,7 @@ declare module "child_process" {
301
306
  // fallback if nothing else matches. Worst case is always `string | Buffer`.
302
307
  function exec(
303
308
  command: string,
304
- options: ({ encoding?: string | null } & ExecOptions) | undefined | null,
309
+ options: (BaseEncodingOptions & ExecOptions) | undefined | null,
305
310
  callback?: (error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void,
306
311
  ): ChildProcess;
307
312
 
@@ -315,7 +320,7 @@ declare module "child_process" {
315
320
  function __promisify__(command: string, options: { encoding: "buffer" | null } & ExecOptions): PromiseWithChild<{ stdout: Buffer, stderr: Buffer }>;
316
321
  function __promisify__(command: string, options: { encoding: BufferEncoding } & ExecOptions): PromiseWithChild<{ stdout: string, stderr: string }>;
317
322
  function __promisify__(command: string, options: ExecOptions): PromiseWithChild<{ stdout: string, stderr: string }>;
318
- function __promisify__(command: string, options?: ({ encoding?: string | null } & ExecOptions) | null): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>;
323
+ function __promisify__(command: string, options?: (BaseEncodingOptions & ExecOptions) | null): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>;
319
324
  }
320
325
 
321
326
  interface ExecFileOptions extends CommonOptions {
@@ -331,13 +336,13 @@ declare module "child_process" {
331
336
  encoding: 'buffer' | null;
332
337
  }
333
338
  interface ExecFileOptionsWithOtherEncoding extends ExecFileOptions {
334
- encoding: string;
339
+ encoding: BufferEncoding;
335
340
  }
336
341
 
337
342
  function execFile(file: string): ChildProcess;
338
- function execFile(file: string, options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null): ChildProcess;
343
+ function execFile(file: string, options: (BaseEncodingOptions & ExecFileOptions) | undefined | null): ChildProcess;
339
344
  function execFile(file: string, args?: ReadonlyArray<string> | null): ChildProcess;
340
- function execFile(file: string, args: ReadonlyArray<string> | undefined | null, options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null): ChildProcess;
345
+ function execFile(file: string, args: ReadonlyArray<string> | undefined | null, options: (BaseEncodingOptions & ExecFileOptions) | undefined | null): ChildProcess;
341
346
 
342
347
  // no `options` definitely means stdout/stderr are `string`.
343
348
  function execFile(file: string, callback: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess;
@@ -387,37 +392,33 @@ declare module "child_process" {
387
392
  // fallback if nothing else matches. Worst case is always `string | Buffer`.
388
393
  function execFile(
389
394
  file: string,
390
- options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null,
395
+ options: (BaseEncodingOptions & ExecFileOptions) | undefined | null,
391
396
  callback: ((error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void) | undefined | null,
392
397
  ): ChildProcess;
393
398
  function execFile(
394
399
  file: string,
395
400
  args: ReadonlyArray<string> | undefined | null,
396
- options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null,
401
+ options: (BaseEncodingOptions & ExecFileOptions) | undefined | null,
397
402
  callback: ((error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void) | undefined | null,
398
403
  ): ChildProcess;
399
404
 
400
405
  // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
401
406
  namespace execFile {
402
407
  function __promisify__(file: string): PromiseWithChild<{ stdout: string, stderr: string }>;
403
- function __promisify__(file: string, args: ReadonlyArray<string> | undefined | null): PromiseWithChild<{ stdout: string, stderr: string }>;
408
+ function __promisify__(file: string, args: string[] | undefined | null): PromiseWithChild<{ stdout: string, stderr: string }>;
404
409
  function __promisify__(file: string, options: ExecFileOptionsWithBufferEncoding): PromiseWithChild<{ stdout: Buffer, stderr: Buffer }>;
405
- function __promisify__(file: string, args: ReadonlyArray<string> | undefined | null, options: ExecFileOptionsWithBufferEncoding): PromiseWithChild<{ stdout: Buffer, stderr: Buffer }>;
410
+ function __promisify__(file: string, args: string[] | undefined | null, options: ExecFileOptionsWithBufferEncoding): PromiseWithChild<{ stdout: Buffer, stderr: Buffer }>;
406
411
  function __promisify__(file: string, options: ExecFileOptionsWithStringEncoding): PromiseWithChild<{ stdout: string, stderr: string }>;
407
- function __promisify__(file: string, args: ReadonlyArray<string> | undefined | null, options: ExecFileOptionsWithStringEncoding): PromiseWithChild<{ stdout: string, stderr: string }>;
412
+ function __promisify__(file: string, args: string[] | undefined | null, options: ExecFileOptionsWithStringEncoding): PromiseWithChild<{ stdout: string, stderr: string }>;
408
413
  function __promisify__(file: string, options: ExecFileOptionsWithOtherEncoding): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>;
409
- function __promisify__(
410
- file: string,
411
- args: ReadonlyArray<string> | undefined | null,
412
- options: ExecFileOptionsWithOtherEncoding,
413
- ): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>;
414
+ function __promisify__(file: string, args: string[] | undefined | null, options: ExecFileOptionsWithOtherEncoding): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>;
414
415
  function __promisify__(file: string, options: ExecFileOptions): PromiseWithChild<{ stdout: string, stderr: string }>;
415
- function __promisify__(file: string, args: ReadonlyArray<string> | undefined | null, options: ExecFileOptions): PromiseWithChild<{ stdout: string, stderr: string }>;
416
- function __promisify__(file: string, options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>;
416
+ function __promisify__(file: string, args: string[] | undefined | null, options: ExecFileOptions): PromiseWithChild<{ stdout: string, stderr: string }>;
417
+ function __promisify__(file: string, options: (BaseEncodingOptions & ExecFileOptions) | undefined | null): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>;
417
418
  function __promisify__(
418
419
  file: string,
419
- args: ReadonlyArray<string> | undefined | null,
420
- options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null,
420
+ args: string[] | undefined | null,
421
+ options: (BaseEncodingOptions & ExecFileOptions) | undefined | null,
421
422
  ): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>;
422
423
  }
423
424
 
@@ -429,20 +430,19 @@ declare module "child_process" {
429
430
  detached?: boolean;
430
431
  windowsVerbatimArguments?: boolean;
431
432
  }
432
- function fork(modulePath: string, options?: ForkOptions): ChildProcess;
433
433
  function fork(modulePath: string, args?: ReadonlyArray<string>, options?: ForkOptions): ChildProcess;
434
434
 
435
435
  interface SpawnSyncOptions extends CommonSpawnOptions {
436
436
  input?: string | NodeJS.ArrayBufferView;
437
437
  killSignal?: NodeJS.Signals | number;
438
438
  maxBuffer?: number;
439
- encoding?: string;
439
+ encoding?: BufferEncoding;
440
440
  }
441
441
  interface SpawnSyncOptionsWithStringEncoding extends SpawnSyncOptions {
442
442
  encoding: BufferEncoding;
443
443
  }
444
444
  interface SpawnSyncOptionsWithBufferEncoding extends SpawnSyncOptions {
445
- encoding: string; // specify `null`.
445
+ encoding: BufferEncoding; // specify `null`.
446
446
  }
447
447
  interface SpawnSyncReturns<T> {
448
448
  pid: number;
@@ -467,13 +467,13 @@ declare module "child_process" {
467
467
  shell?: string;
468
468
  killSignal?: NodeJS.Signals | number;
469
469
  maxBuffer?: number;
470
- encoding?: string;
470
+ encoding?: BufferEncoding;
471
471
  }
472
472
  interface ExecSyncOptionsWithStringEncoding extends ExecSyncOptions {
473
473
  encoding: BufferEncoding;
474
474
  }
475
475
  interface ExecSyncOptionsWithBufferEncoding extends ExecSyncOptions {
476
- encoding: string; // specify `null`.
476
+ encoding: BufferEncoding; // specify `null`.
477
477
  }
478
478
  function execSync(command: string): Buffer;
479
479
  function execSync(command: string, options?: ExecSyncOptionsWithStringEncoding): string;
@@ -485,14 +485,14 @@ declare module "child_process" {
485
485
  stdio?: StdioOptions;
486
486
  killSignal?: NodeJS.Signals | number;
487
487
  maxBuffer?: number;
488
- encoding?: string;
488
+ encoding?: BufferEncoding;
489
489
  shell?: boolean | string;
490
490
  }
491
491
  interface ExecFileSyncOptionsWithStringEncoding extends ExecFileSyncOptions {
492
492
  encoding: BufferEncoding;
493
493
  }
494
494
  interface ExecFileSyncOptionsWithBufferEncoding extends ExecFileSyncOptions {
495
- encoding: string; // specify `null`.
495
+ encoding: BufferEncoding; // specify `null`.
496
496
  }
497
497
  function execFileSync(command: string): Buffer;
498
498
  function execFileSync(command: string, options?: ExecFileSyncOptionsWithStringEncoding): string;
File without changes
File without changes
File without changes