@types/node 13.13.49 → 14.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 (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 -32
  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 -10
  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: Tue, 12 May 2020 23:53:01 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";
@@ -21,10 +22,6 @@ declare module "child_process" {
21
22
  readonly killed: boolean;
22
23
  readonly pid: number;
23
24
  readonly connected: boolean;
24
- readonly exitCode: number | null;
25
- readonly signalCode: number | null;
26
- readonly spawnargs: string[];
27
- readonly spawnfile: string;
28
25
  kill(signal?: NodeJS.Signals | number): boolean;
29
26
  send(message: Serializable, callback?: (error: Error | null) => void): boolean;
30
27
  send(message: Serializable, sendHandle?: SendHandle, callback?: (error: Error | null) => void): boolean;
@@ -272,7 +269,7 @@ declare module "child_process" {
272
269
  }
273
270
 
274
271
  interface ExecOptionsWithBufferEncoding extends ExecOptions {
275
- encoding: string | null; // specify `null`.
272
+ encoding: BufferEncoding | null; // specify `null`.
276
273
  }
277
274
 
278
275
  interface ExecException extends Error {
@@ -293,7 +290,11 @@ declare module "child_process" {
293
290
 
294
291
  // `options` with an `encoding` whose type is `string` means stdout/stderr could either be `Buffer` or `string`.
295
292
  // 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;
293
+ function exec(
294
+ command: string,
295
+ options: { encoding: BufferEncoding } & ExecOptions,
296
+ callback?: (error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void,
297
+ ): ChildProcess;
297
298
 
298
299
  // `options` without an `encoding` means stdout/stderr are definitely `string`.
299
300
  function exec(command: string, options: ExecOptions, callback?: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess;
@@ -301,7 +302,7 @@ declare module "child_process" {
301
302
  // fallback if nothing else matches. Worst case is always `string | Buffer`.
302
303
  function exec(
303
304
  command: string,
304
- options: ({ encoding?: string | null } & ExecOptions) | undefined | null,
305
+ options: (BaseEncodingOptions & ExecOptions) | undefined | null,
305
306
  callback?: (error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void,
306
307
  ): ChildProcess;
307
308
 
@@ -315,7 +316,7 @@ declare module "child_process" {
315
316
  function __promisify__(command: string, options: { encoding: "buffer" | null } & ExecOptions): PromiseWithChild<{ stdout: Buffer, stderr: Buffer }>;
316
317
  function __promisify__(command: string, options: { encoding: BufferEncoding } & ExecOptions): PromiseWithChild<{ stdout: string, stderr: string }>;
317
318
  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 }>;
319
+ function __promisify__(command: string, options?: (BaseEncodingOptions & ExecOptions) | null): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>;
319
320
  }
320
321
 
321
322
  interface ExecFileOptions extends CommonOptions {
@@ -331,13 +332,13 @@ declare module "child_process" {
331
332
  encoding: 'buffer' | null;
332
333
  }
333
334
  interface ExecFileOptionsWithOtherEncoding extends ExecFileOptions {
334
- encoding: string;
335
+ encoding: BufferEncoding;
335
336
  }
336
337
 
337
338
  function execFile(file: string): ChildProcess;
338
- function execFile(file: string, options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null): ChildProcess;
339
+ function execFile(file: string, options: (BaseEncodingOptions & ExecFileOptions) | undefined | null): ChildProcess;
339
340
  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;
341
+ function execFile(file: string, args: ReadonlyArray<string> | undefined | null, options: (BaseEncodingOptions & ExecFileOptions) | undefined | null): ChildProcess;
341
342
 
342
343
  // no `options` definitely means stdout/stderr are `string`.
343
344
  function execFile(file: string, callback: (error: ExecException | null, stdout: string, stderr: string) => void): ChildProcess;
@@ -387,37 +388,33 @@ declare module "child_process" {
387
388
  // fallback if nothing else matches. Worst case is always `string | Buffer`.
388
389
  function execFile(
389
390
  file: string,
390
- options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null,
391
+ options: (BaseEncodingOptions & ExecFileOptions) | undefined | null,
391
392
  callback: ((error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void) | undefined | null,
392
393
  ): ChildProcess;
393
394
  function execFile(
394
395
  file: string,
395
396
  args: ReadonlyArray<string> | undefined | null,
396
- options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null,
397
+ options: (BaseEncodingOptions & ExecFileOptions) | undefined | null,
397
398
  callback: ((error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void) | undefined | null,
398
399
  ): ChildProcess;
399
400
 
400
401
  // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
401
402
  namespace execFile {
402
403
  function __promisify__(file: string): PromiseWithChild<{ stdout: string, stderr: string }>;
403
- function __promisify__(file: string, args: ReadonlyArray<string> | undefined | null): PromiseWithChild<{ stdout: string, stderr: string }>;
404
+ function __promisify__(file: string, args: string[] | undefined | null): PromiseWithChild<{ stdout: string, stderr: string }>;
404
405
  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 }>;
406
+ function __promisify__(file: string, args: string[] | undefined | null, options: ExecFileOptionsWithBufferEncoding): PromiseWithChild<{ stdout: Buffer, stderr: Buffer }>;
406
407
  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 }>;
408
+ function __promisify__(file: string, args: string[] | undefined | null, options: ExecFileOptionsWithStringEncoding): PromiseWithChild<{ stdout: string, stderr: string }>;
408
409
  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 }>;
410
+ function __promisify__(file: string, args: string[] | undefined | null, options: ExecFileOptionsWithOtherEncoding): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>;
414
411
  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 }>;
412
+ function __promisify__(file: string, args: string[] | undefined | null, options: ExecFileOptions): PromiseWithChild<{ stdout: string, stderr: string }>;
413
+ function __promisify__(file: string, options: (BaseEncodingOptions & ExecFileOptions) | undefined | null): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>;
417
414
  function __promisify__(
418
415
  file: string,
419
- args: ReadonlyArray<string> | undefined | null,
420
- options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null,
416
+ args: string[] | undefined | null,
417
+ options: (BaseEncodingOptions & ExecFileOptions) | undefined | null,
421
418
  ): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>;
422
419
  }
423
420
 
@@ -429,20 +426,19 @@ declare module "child_process" {
429
426
  detached?: boolean;
430
427
  windowsVerbatimArguments?: boolean;
431
428
  }
432
- function fork(modulePath: string, options?: ForkOptions): ChildProcess;
433
429
  function fork(modulePath: string, args?: ReadonlyArray<string>, options?: ForkOptions): ChildProcess;
434
430
 
435
431
  interface SpawnSyncOptions extends CommonSpawnOptions {
436
432
  input?: string | NodeJS.ArrayBufferView;
437
433
  killSignal?: NodeJS.Signals | number;
438
434
  maxBuffer?: number;
439
- encoding?: string;
435
+ encoding?: BufferEncoding;
440
436
  }
441
437
  interface SpawnSyncOptionsWithStringEncoding extends SpawnSyncOptions {
442
438
  encoding: BufferEncoding;
443
439
  }
444
440
  interface SpawnSyncOptionsWithBufferEncoding extends SpawnSyncOptions {
445
- encoding: string; // specify `null`.
441
+ encoding: BufferEncoding; // specify `null`.
446
442
  }
447
443
  interface SpawnSyncReturns<T> {
448
444
  pid: number;
@@ -467,13 +463,13 @@ declare module "child_process" {
467
463
  shell?: string;
468
464
  killSignal?: NodeJS.Signals | number;
469
465
  maxBuffer?: number;
470
- encoding?: string;
466
+ encoding?: BufferEncoding;
471
467
  }
472
468
  interface ExecSyncOptionsWithStringEncoding extends ExecSyncOptions {
473
469
  encoding: BufferEncoding;
474
470
  }
475
471
  interface ExecSyncOptionsWithBufferEncoding extends ExecSyncOptions {
476
- encoding: string; // specify `null`.
472
+ encoding: BufferEncoding; // specify `null`.
477
473
  }
478
474
  function execSync(command: string): Buffer;
479
475
  function execSync(command: string, options?: ExecSyncOptionsWithStringEncoding): string;
@@ -485,14 +481,14 @@ declare module "child_process" {
485
481
  stdio?: StdioOptions;
486
482
  killSignal?: NodeJS.Signals | number;
487
483
  maxBuffer?: number;
488
- encoding?: string;
484
+ encoding?: BufferEncoding;
489
485
  shell?: boolean | string;
490
486
  }
491
487
  interface ExecFileSyncOptionsWithStringEncoding extends ExecFileSyncOptions {
492
488
  encoding: BufferEncoding;
493
489
  }
494
490
  interface ExecFileSyncOptionsWithBufferEncoding extends ExecFileSyncOptions {
495
- encoding: string; // specify `null`.
491
+ encoding: BufferEncoding; // specify `null`.
496
492
  }
497
493
  function execFileSync(command: string): Buffer;
498
494
  function execFileSync(command: string, options?: ExecFileSyncOptionsWithStringEncoding): string;
File without changes
File without changes
File without changes