@types/node 14.11.8 → 14.14.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.
node/README.md CHANGED
@@ -8,7 +8,7 @@ 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: Fri, 09 Oct 2020 06:51:10 GMT
11
+ * Last updated: Tue, 20 Oct 2020 12:08:55 GMT
12
12
  * Dependencies: none
13
13
  * Global values: `Buffer`, `__dirname`, `__filename`, `clearImmediate`, `clearInterval`, `clearTimeout`, `console`, `exports`, `global`, `module`, `process`, `queueMicrotask`, `require`, `setImmediate`, `setInterval`, `setTimeout`
14
14
 
node/child_process.d.ts CHANGED
@@ -405,19 +405,23 @@ declare module "child_process" {
405
405
  // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
406
406
  namespace execFile {
407
407
  function __promisify__(file: string): PromiseWithChild<{ stdout: string, stderr: string }>;
408
- function __promisify__(file: string, args: string[] | undefined | null): PromiseWithChild<{ stdout: string, stderr: string }>;
408
+ function __promisify__(file: string, args: ReadonlyArray<string> | undefined | null): PromiseWithChild<{ stdout: string, stderr: string }>;
409
409
  function __promisify__(file: string, options: ExecFileOptionsWithBufferEncoding): PromiseWithChild<{ stdout: Buffer, stderr: Buffer }>;
410
- function __promisify__(file: string, args: string[] | undefined | null, options: ExecFileOptionsWithBufferEncoding): PromiseWithChild<{ stdout: Buffer, stderr: Buffer }>;
410
+ function __promisify__(file: string, args: ReadonlyArray<string> | undefined | null, options: ExecFileOptionsWithBufferEncoding): PromiseWithChild<{ stdout: Buffer, stderr: Buffer }>;
411
411
  function __promisify__(file: string, options: ExecFileOptionsWithStringEncoding): PromiseWithChild<{ stdout: string, stderr: string }>;
412
- function __promisify__(file: string, args: string[] | undefined | null, options: ExecFileOptionsWithStringEncoding): PromiseWithChild<{ stdout: string, stderr: string }>;
412
+ function __promisify__(file: string, args: ReadonlyArray<string> | undefined | null, options: ExecFileOptionsWithStringEncoding): PromiseWithChild<{ stdout: string, stderr: string }>;
413
413
  function __promisify__(file: string, options: ExecFileOptionsWithOtherEncoding): 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
+ function __promisify__(
415
+ file: string,
416
+ args: ReadonlyArray<string> | undefined | null,
417
+ options: ExecFileOptionsWithOtherEncoding,
418
+ ): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>;
415
419
  function __promisify__(file: string, options: ExecFileOptions): PromiseWithChild<{ stdout: string, stderr: string }>;
416
- function __promisify__(file: string, args: string[] | undefined | null, options: ExecFileOptions): PromiseWithChild<{ stdout: string, stderr: string }>;
420
+ function __promisify__(file: string, args: ReadonlyArray<string> | undefined | null, options: ExecFileOptions): PromiseWithChild<{ stdout: string, stderr: string }>;
417
421
  function __promisify__(file: string, options: (BaseEncodingOptions & ExecFileOptions) | undefined | null): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>;
418
422
  function __promisify__(
419
423
  file: string,
420
- args: string[] | undefined | null,
424
+ args: ReadonlyArray<string> | undefined | null,
421
425
  options: (BaseEncodingOptions & ExecFileOptions) | undefined | null,
422
426
  ): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>;
423
427
  }
node/console.d.ts CHANGED
@@ -66,7 +66,7 @@ declare module "console" {
66
66
  * This method does not display anything unless used in the inspector.
67
67
  * Prints to `stdout` the array `array` formatted as a table.
68
68
  */
69
- table(tabularData: any, properties?: string[]): void;
69
+ table(tabularData: any, properties?: ReadonlyArray<string>): void;
70
70
  /**
71
71
  * Starts a timer that can be used to compute the duration of an operation. Timers are identified by a unique `label`.
72
72
  */
node/dgram.d.ts CHANGED
@@ -50,9 +50,9 @@ declare module "dgram" {
50
50
  getSendBufferSize(): number;
51
51
  ref(): this;
52
52
  remoteAddress(): AddressInfo;
53
- send(msg: string | Uint8Array | any[], port?: number, address?: string, callback?: (error: Error | null, bytes: number) => void): void;
54
- send(msg: string | Uint8Array | any[], port?: number, callback?: (error: Error | null, bytes: number) => void): void;
55
- send(msg: string | Uint8Array | any[], callback?: (error: Error | null, bytes: number) => void): void;
53
+ send(msg: string | Uint8Array | ReadonlyArray<any>, port?: number, address?: string, callback?: (error: Error | null, bytes: number) => void): void;
54
+ send(msg: string | Uint8Array | ReadonlyArray<any>, port?: number, callback?: (error: Error | null, bytes: number) => void): void;
55
+ send(msg: string | Uint8Array | ReadonlyArray<any>, callback?: (error: Error | null, bytes: number) => void): void;
56
56
  send(msg: string | Uint8Array, offset: number, length: number, port?: number, address?: string, callback?: (error: Error | null, bytes: number) => void): void;
57
57
  send(msg: string | Uint8Array, offset: number, length: number, port?: number, callback?: (error: Error | null, bytes: number) => void): void;
58
58
  send(msg: string | Uint8Array, offset: number, length: number, callback?: (error: Error | null, bytes: number) => void): void;
node/events.d.ts CHANGED
@@ -70,7 +70,7 @@ declare module "events" {
70
70
  listeners(event: string | symbol): Function[];
71
71
  rawListeners(event: string | symbol): Function[];
72
72
  emit(event: string | symbol, ...args: any[]): boolean;
73
- listenerCount(type: string | symbol): number;
73
+ listenerCount(event: string | symbol): number;
74
74
  // Added in Node 6...
75
75
  prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
76
76
  prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
node/fs/promises.d.ts CHANGED
@@ -4,7 +4,8 @@ declare module 'fs/promises' {
4
4
  WriteVResult,
5
5
  ReadVResult,
6
6
  PathLike,
7
- RmDirAsyncOptions,
7
+ RmDirOptions,
8
+ RmOptions,
8
9
  MakeDirectoryOptions,
9
10
  Dirent,
10
11
  OpenDirOptions,
@@ -143,12 +144,12 @@ declare module 'fs/promises' {
143
144
  /**
144
145
  * See `fs.writev` promisified version.
145
146
  */
146
- writev(buffers: NodeJS.ArrayBufferView[], position?: number): Promise<WriteVResult>;
147
+ writev(buffers: ReadonlyArray<NodeJS.ArrayBufferView>, position?: number): Promise<WriteVResult>;
147
148
 
148
149
  /**
149
150
  * See `fs.readv` promisified version.
150
151
  */
151
- readv(buffers: NodeJS.ArrayBufferView[], position?: number): Promise<ReadVResult>;
152
+ readv(buffers: ReadonlyArray<NodeJS.ArrayBufferView>, position?: number): Promise<ReadVResult>;
152
153
 
153
154
  /**
154
155
  * Asynchronous close(2) - close a `FileHandle`.
@@ -255,7 +256,12 @@ declare module 'fs/promises' {
255
256
  * Asynchronous rmdir(2) - delete a directory.
256
257
  * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
257
258
  */
258
- function rmdir(path: PathLike, options?: RmDirAsyncOptions): Promise<void>;
259
+ function rmdir(path: PathLike, options?: RmDirOptions): Promise<void>;
260
+
261
+ /**
262
+ * Asynchronously removes files and directories (modeled on the standard POSIX `rm` utility).
263
+ */
264
+ function rm(path: PathLike, options?: RmOptions): Promise<void>;
259
265
 
260
266
  /**
261
267
  * Asynchronous fdatasync(2) - synchronize a file's in-core state with storage device.
node/fs.d.ts CHANGED
@@ -821,31 +821,32 @@ declare module "fs" {
821
821
 
822
822
  export interface RmDirOptions {
823
823
  /**
824
+ * If an `EBUSY`, `EMFILE`, `ENFILE`, `ENOTEMPTY`, or
825
+ * `EPERM` error is encountered, Node.js will retry the operation with a linear
826
+ * backoff wait of `retryDelay` ms longer on each try. This option represents the
827
+ * number of retries. This option is ignored if the `recursive` option is not
828
+ * `true`.
829
+ * @default 0
830
+ */
831
+ maxRetries?: number;
832
+ /**
833
+ * @deprecated since v14.14.0 In future versions of Node.js,
834
+ * `fs.rmdir(path, { recursive: true })` will throw on nonexistent
835
+ * paths, or when given a file as a target.
836
+ * Use `fs.rm(path, { recursive: true, force: true })` instead.
837
+ *
824
838
  * If `true`, perform a recursive directory removal. In
825
839
  * recursive mode, errors are not reported if `path` does not exist, and
826
840
  * operations are retried on failure.
827
- * @experimental
828
841
  * @default false
829
842
  */
830
843
  recursive?: boolean;
831
- }
832
-
833
- export interface RmDirAsyncOptions extends RmDirOptions {
834
844
  /**
835
845
  * The amount of time in milliseconds to wait between retries.
836
846
  * This option is ignored if the `recursive` option is not `true`.
837
847
  * @default 100
838
848
  */
839
849
  retryDelay?: number;
840
- /**
841
- * If an `EBUSY`, `EMFILE`, `ENFILE`, `ENOTEMPTY`, or
842
- * `EPERM` error is encountered, Node.js will retry the operation with a linear
843
- * backoff wait of `retryDelay` ms longer on each try. This option represents the
844
- * number of retries. This option is ignored if the `recursive` option is not
845
- * `true`.
846
- * @default 0
847
- */
848
- maxRetries?: number;
849
850
  }
850
851
 
851
852
  /**
@@ -853,7 +854,7 @@ declare module "fs" {
853
854
  * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
854
855
  */
855
856
  export function rmdir(path: PathLike, callback: NoParamCallback): void;
856
- export function rmdir(path: PathLike, options: RmDirAsyncOptions, callback: NoParamCallback): void;
857
+ export function rmdir(path: PathLike, options: RmDirOptions, callback: NoParamCallback): void;
857
858
 
858
859
  // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
859
860
  export namespace rmdir {
@@ -861,7 +862,7 @@ declare module "fs" {
861
862
  * Asynchronous rmdir(2) - delete a directory.
862
863
  * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
863
864
  */
864
- function __promisify__(path: PathLike, options?: RmDirAsyncOptions): Promise<void>;
865
+ function __promisify__(path: PathLike, options?: RmDirOptions): Promise<void>;
865
866
  }
866
867
 
867
868
  /**
@@ -870,6 +871,55 @@ declare module "fs" {
870
871
  */
871
872
  export function rmdirSync(path: PathLike, options?: RmDirOptions): void;
872
873
 
874
+ export interface RmOptions {
875
+ /**
876
+ * When `true`, exceptions will be ignored if `path` does not exist.
877
+ * @default false
878
+ */
879
+ force?: boolean;
880
+ /**
881
+ * If an `EBUSY`, `EMFILE`, `ENFILE`, `ENOTEMPTY`, or
882
+ * `EPERM` error is encountered, Node.js will retry the operation with a linear
883
+ * backoff wait of `retryDelay` ms longer on each try. This option represents the
884
+ * number of retries. This option is ignored if the `recursive` option is not
885
+ * `true`.
886
+ * @default 0
887
+ */
888
+ maxRetries?: number;
889
+ /**
890
+ * If `true`, perform a recursive directory removal. In
891
+ * recursive mode, errors are not reported if `path` does not exist, and
892
+ * operations are retried on failure.
893
+ * @default false
894
+ */
895
+ recursive?: boolean;
896
+ /**
897
+ * The amount of time in milliseconds to wait between retries.
898
+ * This option is ignored if the `recursive` option is not `true`.
899
+ * @default 100
900
+ */
901
+ retryDelay?: number;
902
+ }
903
+
904
+ /**
905
+ * Asynchronously removes files and directories (modeled on the standard POSIX `rm` utility).
906
+ */
907
+ export function rm(path: PathLike, callback: NoParamCallback): void;
908
+ export function rm(path: PathLike, options: RmOptions, callback: NoParamCallback): void;
909
+
910
+ // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
911
+ export namespace rm {
912
+ /**
913
+ * Asynchronously removes files and directories (modeled on the standard POSIX `rm` utility).
914
+ */
915
+ function __promisify__(path: PathLike, options?: RmOptions): Promise<void>;
916
+ }
917
+
918
+ /**
919
+ * Synchronously removes files and directories (modeled on the standard POSIX `rm` utility).
920
+ */
921
+ export function rmSync(path: PathLike, options?: RmOptions): void;
922
+
873
923
  export interface MakeDirectoryOptions {
874
924
  /**
875
925
  * Indicates whether parent folders should be created.
@@ -2066,12 +2116,12 @@ declare module "fs" {
2066
2116
  */
2067
2117
  export function writev(
2068
2118
  fd: number,
2069
- buffers: NodeJS.ArrayBufferView[],
2119
+ buffers: ReadonlyArray<NodeJS.ArrayBufferView>,
2070
2120
  cb: (err: NodeJS.ErrnoException | null, bytesWritten: number, buffers: NodeJS.ArrayBufferView[]) => void
2071
2121
  ): void;
2072
2122
  export function writev(
2073
2123
  fd: number,
2074
- buffers: NodeJS.ArrayBufferView[],
2124
+ buffers: ReadonlyArray<NodeJS.ArrayBufferView>,
2075
2125
  position: number,
2076
2126
  cb: (err: NodeJS.ErrnoException | null, bytesWritten: number, buffers: NodeJS.ArrayBufferView[]) => void
2077
2127
  ): void;
@@ -2082,22 +2132,22 @@ declare module "fs" {
2082
2132
  }
2083
2133
 
2084
2134
  export namespace writev {
2085
- function __promisify__(fd: number, buffers: NodeJS.ArrayBufferView[], position?: number): Promise<WriteVResult>;
2135
+ function __promisify__(fd: number, buffers: ReadonlyArray<NodeJS.ArrayBufferView>, position?: number): Promise<WriteVResult>;
2086
2136
  }
2087
2137
 
2088
2138
  /**
2089
2139
  * See `writev`.
2090
2140
  */
2091
- export function writevSync(fd: number, buffers: NodeJS.ArrayBufferView[], position?: number): number;
2141
+ export function writevSync(fd: number, buffers: ReadonlyArray<NodeJS.ArrayBufferView>, position?: number): number;
2092
2142
 
2093
2143
  export function readv(
2094
2144
  fd: number,
2095
- buffers: NodeJS.ArrayBufferView[],
2145
+ buffers: ReadonlyArray<NodeJS.ArrayBufferView>,
2096
2146
  cb: (err: NodeJS.ErrnoException | null, bytesRead: number, buffers: NodeJS.ArrayBufferView[]) => void
2097
2147
  ): void;
2098
2148
  export function readv(
2099
2149
  fd: number,
2100
- buffers: NodeJS.ArrayBufferView[],
2150
+ buffers: ReadonlyArray<NodeJS.ArrayBufferView>,
2101
2151
  position: number,
2102
2152
  cb: (err: NodeJS.ErrnoException | null, bytesRead: number, buffers: NodeJS.ArrayBufferView[]) => void
2103
2153
  ): void;
@@ -2108,13 +2158,13 @@ declare module "fs" {
2108
2158
  }
2109
2159
 
2110
2160
  export namespace readv {
2111
- function __promisify__(fd: number, buffers: NodeJS.ArrayBufferView[], position?: number): Promise<ReadVResult>;
2161
+ function __promisify__(fd: number, buffers: ReadonlyArray<NodeJS.ArrayBufferView>, position?: number): Promise<ReadVResult>;
2112
2162
  }
2113
2163
 
2114
2164
  /**
2115
2165
  * See `readv`.
2116
2166
  */
2117
- export function readvSync(fd: number, buffers: NodeJS.ArrayBufferView[], position?: number): number;
2167
+ export function readvSync(fd: number, buffers: ReadonlyArray<NodeJS.ArrayBufferView>, position?: number): number;
2118
2168
 
2119
2169
  export interface OpenDirOptions {
2120
2170
  encoding?: BufferEncoding;
node/globals.d.ts CHANGED
@@ -116,7 +116,7 @@ declare class Buffer extends Uint8Array {
116
116
  * @param array The octets to store.
117
117
  * @deprecated since v10.0.0 - Use `Buffer.from(array)` instead.
118
118
  */
119
- constructor(array: any[]);
119
+ constructor(array: ReadonlyArray<any>);
120
120
  /**
121
121
  * Copies the passed {buffer} data onto a new {Buffer} instance.
122
122
  *
@@ -137,7 +137,7 @@ declare class Buffer extends Uint8Array {
137
137
  * Creates a new Buffer using the passed {data}
138
138
  * @param data data to create a new Buffer
139
139
  */
140
- static from(data: number[]): Buffer;
140
+ static from(data: ReadonlyArray<number>): Buffer;
141
141
  static from(data: Uint8Array): Buffer;
142
142
  /**
143
143
  * Creates a new buffer containing the coerced value of an object
@@ -191,7 +191,7 @@ declare class Buffer extends Uint8Array {
191
191
  * @param totalLength Total length of the buffers when concatenated.
192
192
  * If totalLength is not provided, it is read from the buffers in the list. However, this adds an additional loop to the function, so it is faster to provide the length explicitly.
193
193
  */
194
- static concat(list: Uint8Array[], totalLength?: number): Buffer;
194
+ static concat(list: ReadonlyArray<Uint8Array>, totalLength?: number): Buffer;
195
195
  /**
196
196
  * The same as buf1.compare(buf2).
197
197
  */
node/http.d.ts CHANGED
@@ -65,7 +65,9 @@ declare module "http" {
65
65
  }
66
66
 
67
67
  // outgoing headers allows numbers (as they are converted internally to strings)
68
- interface OutgoingHttpHeaders extends NodeJS.Dict<number | string | string[]> {
68
+ type OutgoingHttpHeader = number | string | string[];
69
+
70
+ interface OutgoingHttpHeaders extends NodeJS.Dict<OutgoingHttpHeader> {
69
71
  }
70
72
 
71
73
  interface ClientRequestArgs {
@@ -166,13 +168,13 @@ declare module "http" {
166
168
  constructor();
167
169
 
168
170
  setTimeout(msecs: number, callback?: () => void): this;
169
- setHeader(name: string, value: number | string | string[]): void;
171
+ setHeader(name: string, value: number | string | ReadonlyArray<string>): void;
170
172
  getHeader(name: string): number | string | string[] | undefined;
171
173
  getHeaders(): OutgoingHttpHeaders;
172
174
  getHeaderNames(): string[];
173
175
  hasHeader(name: string): boolean;
174
176
  removeHeader(name: string): void;
175
- addTrailers(headers: OutgoingHttpHeaders | Array<[string, string]>): void;
177
+ addTrailers(headers: OutgoingHttpHeaders | ReadonlyArray<[string, string]>): void;
176
178
  flushHeaders(): void;
177
179
  }
178
180
 
@@ -188,8 +190,8 @@ declare module "http" {
188
190
  // https://github.com/nodejs/node/blob/master/test/parallel/test-http-write-callbacks.js#L53
189
191
  // no args in writeContinue callback
190
192
  writeContinue(callback?: () => void): void;
191
- writeHead(statusCode: number, reasonPhrase?: string, headers?: OutgoingHttpHeaders): this;
192
- writeHead(statusCode: number, headers?: OutgoingHttpHeaders): this;
193
+ writeHead(statusCode: number, reasonPhrase?: string, headers?: OutgoingHttpHeaders | OutgoingHttpHeader[]): this;
194
+ writeHead(statusCode: number, headers?: OutgoingHttpHeaders | OutgoingHttpHeader[]): this;
193
195
  writeProcessing(): void;
194
196
  }
195
197
 
node/http2.d.ts CHANGED
@@ -356,7 +356,7 @@ declare module "http2" {
356
356
  addListener(event: string | symbol, listener: (...args: any[]) => void): this;
357
357
 
358
358
  emit(event: "altsvc", alt: string, origin: string, stream: number): boolean;
359
- emit(event: "origin", origins: string[]): boolean;
359
+ emit(event: "origin", origins: ReadonlyArray<string>): boolean;
360
360
  emit(event: "connect", session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket): boolean;
361
361
  emit(event: "stream", stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number): boolean;
362
362
  emit(event: string | symbol, ...args: any[]): boolean;
@@ -571,7 +571,7 @@ declare module "http2" {
571
571
  }
572
572
 
573
573
  export class Http2ServerRequest extends stream.Readable {
574
- constructor(stream: ServerHttp2Stream, headers: IncomingHttpHeaders, options: stream.ReadableOptions, rawHeaders: string[]);
574
+ constructor(stream: ServerHttp2Stream, headers: IncomingHttpHeaders, options: stream.ReadableOptions, rawHeaders: ReadonlyArray<string>);
575
575
 
576
576
  readonly aborted: boolean;
577
577
  readonly authority: string;
@@ -662,7 +662,7 @@ declare module "http2" {
662
662
  getHeaders(): OutgoingHttpHeaders;
663
663
  hasHeader(name: string): boolean;
664
664
  removeHeader(name: string): void;
665
- setHeader(name: string, value: number | string | string[]): void;
665
+ setHeader(name: string, value: number | string | ReadonlyArray<string>): void;
666
666
  setTimeout(msecs: number, callback?: () => void): void;
667
667
  write(chunk: string | Uint8Array, callback?: (err: Error) => void): boolean;
668
668
  write(chunk: string | Uint8Array, encoding: BufferEncoding, callback?: (err: Error) => void): boolean;
node/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- // Type definitions for non-npm package Node.js 14.11
1
+ // Type definitions for non-npm package Node.js 14.14
2
2
  // Project: http://nodejs.org/
3
3
  // Definitions by: Microsoft TypeScript <https://github.com/Microsoft>
4
4
  // DefinitelyTyped <https://github.com/DefinitelyTyped>
node/net.d.ts CHANGED
@@ -71,7 +71,7 @@ declare module "net" {
71
71
  setTimeout(timeout: number, callback?: () => void): this;
72
72
  setNoDelay(noDelay?: boolean): this;
73
73
  setKeepAlive(enable?: boolean, initialDelay?: number): this;
74
- address(): AddressInfo | string;
74
+ address(): AddressInfo | {};
75
75
  unref(): this;
76
76
  ref(): this;
77
77
 
node/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "14.11.8",
3
+ "version": "14.14.0",
4
4
  "description": "TypeScript definitions for Node.js",
5
5
  "license": "MIT",
6
6
  "contributors": [
@@ -246,6 +246,6 @@
246
246
  },
247
247
  "scripts": {},
248
248
  "dependencies": {},
249
- "typesPublisherContentHash": "2648fdcf6d0b183d3a081cb17833d47c55084f5245aa4f9a8ea246ed71a45a8b",
249
+ "typesPublisherContentHash": "9f0797a503e4430cde61fedb34a29cd62ee2c4d3eec48cd21ec8d58cf09b3e79",
250
250
  "typeScriptVersion": "3.2"
251
251
  }
node/perf_hooks.d.ts CHANGED
@@ -186,7 +186,7 @@ declare module 'perf_hooks' {
186
186
  * Property buffered defaults to false.
187
187
  * @param options
188
188
  */
189
- observe(options: { entryTypes: EntryType[]; buffered?: boolean }): void;
189
+ observe(options: { entryTypes: ReadonlyArray<EntryType>; buffered?: boolean }): void;
190
190
  }
191
191
 
192
192
  namespace constants {
node/process.d.ts CHANGED
@@ -209,7 +209,7 @@ declare module "process" {
209
209
  getegid(): number;
210
210
  setegid(id: number | string): void;
211
211
  getgroups(): number[];
212
- setgroups(groups: Array<string | number>): void;
212
+ setgroups(groups: ReadonlyArray<string | number>): void;
213
213
  setUncaughtExceptionCaptureCallback(cb: ((err: Error) => void) | null): void;
214
214
  hasUncaughtExceptionCaptureCallback(): boolean;
215
215
  version: string;
node/punycode.d.ts CHANGED
@@ -55,7 +55,7 @@ declare module "punycode" {
55
55
  * Users currently depending on the punycode module should switch to using
56
56
  * the userland-provided Punycode.js module instead.
57
57
  */
58
- encode(codePoints: number[]): string;
58
+ encode(codePoints: ReadonlyArray<number>): string;
59
59
  }
60
60
  /**
61
61
  * @deprecated since v7.0.0
node/stream.d.ts CHANGED
@@ -314,7 +314,10 @@ declare module "stream" {
314
314
  stream5: T,
315
315
  callback?: (err: NodeJS.ErrnoException | null) => void,
316
316
  ): T;
317
- function pipeline(streams: Array<NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream>, callback?: (err: NodeJS.ErrnoException | null) => void): NodeJS.WritableStream;
317
+ function pipeline(
318
+ streams: ReadonlyArray<NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream>,
319
+ callback?: (err: NodeJS.ErrnoException | null) => void,
320
+ ): NodeJS.WritableStream;
318
321
  function pipeline(
319
322
  stream1: NodeJS.ReadableStream,
320
323
  stream2: NodeJS.ReadWriteStream | NodeJS.WritableStream,
@@ -331,7 +334,7 @@ declare module "stream" {
331
334
  stream4: NodeJS.ReadWriteStream,
332
335
  stream5: NodeJS.WritableStream,
333
336
  ): Promise<void>;
334
- function __promisify__(streams: Array<NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream>): Promise<void>;
337
+ function __promisify__(streams: ReadonlyArray<NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream>): Promise<void>;
335
338
  function __promisify__(
336
339
  stream1: NodeJS.ReadableStream,
337
340
  stream2: NodeJS.ReadWriteStream | NodeJS.WritableStream,
node/url.d.ts CHANGED
@@ -92,7 +92,7 @@ declare module "url" {
92
92
  }
93
93
 
94
94
  class URLSearchParams implements Iterable<[string, string]> {
95
- constructor(init?: URLSearchParams | string | NodeJS.Dict<string | string[]> | Iterable<[string, string]> | Array<[string, string]>);
95
+ constructor(init?: URLSearchParams | string | NodeJS.Dict<string | ReadonlyArray<string>> | Iterable<[string, string]> | ReadonlyArray<[string, string]>);
96
96
  append(name: string, value: string): void;
97
97
  delete(name: string): void;
98
98
  entries(): IterableIterator<[string, string]>;
node/vm.d.ts CHANGED
@@ -125,7 +125,7 @@ declare module "vm" {
125
125
  function runInContext(code: string, contextifiedSandbox: Context, options?: RunningScriptOptions | string): any;
126
126
  function runInNewContext(code: string, sandbox?: Context, options?: RunningScriptOptions | string): any;
127
127
  function runInThisContext(code: string, options?: RunningScriptOptions | string): any;
128
- function compileFunction(code: string, params?: string[], options?: CompileFunctionOptions): Function;
128
+ function compileFunction(code: string, params?: ReadonlyArray<string>, options?: CompileFunctionOptions): Function;
129
129
 
130
130
  /**
131
131
  * Measure the memory known to V8 and used by the current execution context or a specified context.
node/worker_threads.d.ts CHANGED
@@ -21,7 +21,7 @@ declare module "worker_threads" {
21
21
 
22
22
  class MessagePort extends EventEmitter {
23
23
  close(): void;
24
- postMessage(value: any, transferList?: TransferListItem[]): void;
24
+ postMessage(value: any, transferList?: ReadonlyArray<TransferListItem>): void;
25
25
  ref(): void;
26
26
  unref(): void;
27
27
  start(): void;
@@ -124,7 +124,7 @@ declare module "worker_threads" {
124
124
  */
125
125
  constructor(filename: string | URL, options?: WorkerOptions);
126
126
 
127
- postMessage(value: any, transferList?: TransferListItem[]): void;
127
+ postMessage(value: any, transferList?: ReadonlyArray<TransferListItem>): void;
128
128
  ref(): void;
129
129
  unref(): void;
130
130
  /**