@types/node 20.0.0 → 20.1.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 (84) hide show
  1. node/README.md +1 -1
  2. node/assert.d.ts +4 -3
  3. node/async_hooks.d.ts +1 -1
  4. node/buffer.d.ts +6 -6
  5. node/child_process.d.ts +1 -1
  6. node/cluster.d.ts +1 -1
  7. node/console.d.ts +1 -1
  8. node/crypto.d.ts +1 -1
  9. node/dgram.d.ts +1 -1
  10. node/diagnostics_channel.d.ts +1 -1
  11. node/dns.d.ts +9 -1
  12. node/domain.d.ts +2 -2
  13. node/events.d.ts +1 -1
  14. node/fs/promises.d.ts +4 -0
  15. node/fs.d.ts +27 -1
  16. node/http.d.ts +12 -4
  17. node/http2.d.ts +1 -1
  18. node/https.d.ts +1 -1
  19. node/index.d.ts +1 -1
  20. node/inspector.d.ts +1 -1
  21. node/net.d.ts +1 -1
  22. node/os.d.ts +1 -1
  23. node/package.json +2 -2
  24. node/path.d.ts +1 -1
  25. node/perf_hooks.d.ts +1 -1
  26. node/punycode.d.ts +1 -1
  27. node/querystring.d.ts +1 -1
  28. node/readline.d.ts +1 -1
  29. node/repl.d.ts +1 -1
  30. node/stream.d.ts +15 -1
  31. node/string_decoder.d.ts +1 -1
  32. node/test.d.ts +423 -110
  33. node/timers.d.ts +1 -1
  34. node/tls.d.ts +3 -2
  35. node/trace_events.d.ts +1 -1
  36. node/ts4.8/assert.d.ts +5 -4
  37. node/ts4.8/async_hooks.d.ts +5 -13
  38. node/ts4.8/buffer.d.ts +6 -6
  39. node/ts4.8/child_process.d.ts +1 -1
  40. node/ts4.8/cluster.d.ts +1 -1
  41. node/ts4.8/console.d.ts +1 -1
  42. node/ts4.8/crypto.d.ts +1 -1
  43. node/ts4.8/dgram.d.ts +1 -1
  44. node/ts4.8/diagnostics_channel.d.ts +1 -1
  45. node/ts4.8/dns.d.ts +9 -1
  46. node/ts4.8/domain.d.ts +2 -2
  47. node/ts4.8/events.d.ts +1 -1
  48. node/ts4.8/fs/promises.d.ts +24 -0
  49. node/ts4.8/fs.d.ts +123 -1
  50. node/ts4.8/globals.d.ts +29 -28
  51. node/ts4.8/http.d.ts +67 -2
  52. node/ts4.8/http2.d.ts +1 -1
  53. node/ts4.8/https.d.ts +1 -1
  54. node/ts4.8/inspector.d.ts +1 -1
  55. node/ts4.8/net.d.ts +7 -7
  56. node/ts4.8/os.d.ts +1 -1
  57. node/ts4.8/path.d.ts +1 -1
  58. node/ts4.8/perf_hooks.d.ts +1 -1
  59. node/ts4.8/punycode.d.ts +1 -1
  60. node/ts4.8/querystring.d.ts +1 -1
  61. node/ts4.8/readline.d.ts +1 -1
  62. node/ts4.8/repl.d.ts +1 -1
  63. node/ts4.8/stream.d.ts +15 -1
  64. node/ts4.8/string_decoder.d.ts +1 -1
  65. node/ts4.8/test.d.ts +423 -111
  66. node/ts4.8/timers.d.ts +8 -1
  67. node/ts4.8/tls.d.ts +3 -2
  68. node/ts4.8/trace_events.d.ts +1 -1
  69. node/ts4.8/tty.d.ts +1 -1
  70. node/ts4.8/url.d.ts +1 -1
  71. node/ts4.8/util.d.ts +2 -2
  72. node/ts4.8/v8.d.ts +4 -1
  73. node/ts4.8/vm.d.ts +1 -1
  74. node/ts4.8/wasi.d.ts +6 -6
  75. node/ts4.8/worker_threads.d.ts +1 -1
  76. node/ts4.8/zlib.d.ts +1 -1
  77. node/tty.d.ts +1 -1
  78. node/url.d.ts +1 -1
  79. node/util.d.ts +2 -2
  80. node/v8.d.ts +1 -1
  81. node/vm.d.ts +1 -1
  82. node/wasi.d.ts +6 -6
  83. node/worker_threads.d.ts +1 -1
  84. node/zlib.d.ts +1 -1
node/ts4.8/globals.d.ts CHANGED
@@ -45,42 +45,42 @@ declare var gc: undefined | (() => void);
45
45
  // from https://github.com/microsoft/TypeScript/blob/38da7c600c83e7b31193a62495239a0fe478cb67/lib/lib.webworker.d.ts#L633 until moved to separate lib
46
46
  /** A controller object that allows you to abort one or more DOM requests as and when desired. */
47
47
  interface AbortController {
48
- /**
49
- * Returns the AbortSignal object associated with this object.
50
- */
51
-
52
- readonly signal: AbortSignal;
53
- /**
54
- * 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.
55
- */
56
- abort(reason?: any): void;
48
+ /**
49
+ * Returns the AbortSignal object associated with this object.
50
+ */
51
+
52
+ readonly signal: AbortSignal;
53
+ /**
54
+ * 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.
55
+ */
56
+ abort(reason?: any): void;
57
57
  }
58
58
 
59
59
  /** A signal object that allows you to communicate with a DOM request (such as a Fetch) and abort it if required via an AbortController object. */
60
60
  interface AbortSignal extends EventTarget {
61
- /**
62
- * Returns true if this AbortSignal's AbortController has signaled to abort, and false otherwise.
63
- */
64
- readonly aborted: boolean;
65
- readonly reason: any;
66
- onabort: null | ((this: AbortSignal, event: Event) => any);
61
+ /**
62
+ * Returns true if this AbortSignal's AbortController has signaled to abort, and false otherwise.
63
+ */
64
+ readonly aborted: boolean;
65
+ readonly reason: any;
66
+ onabort: null | ((this: AbortSignal, event: Event) => any);
67
67
  }
68
68
 
69
69
  declare var AbortController: typeof globalThis extends {onmessage: any; AbortController: infer T}
70
- ? T
71
- : {
72
- prototype: AbortController;
73
- new(): AbortController;
74
- };
70
+ ? T
71
+ : {
72
+ prototype: AbortController;
73
+ new(): AbortController;
74
+ };
75
75
 
76
76
  declare var AbortSignal: typeof globalThis extends {onmessage: any; AbortSignal: infer T}
77
- ? T
78
- : {
79
- prototype: AbortSignal;
80
- new(): AbortSignal;
81
- abort(reason?: any): AbortSignal;
82
- timeout(milliseconds: number): AbortSignal;
83
- };
77
+ ? T
78
+ : {
79
+ prototype: AbortSignal;
80
+ new(): AbortSignal;
81
+ abort(reason?: any): AbortSignal;
82
+ timeout(milliseconds: number): AbortSignal;
83
+ };
84
84
  //#endregion borrowed
85
85
 
86
86
  //#region ArrayLike.at()
@@ -94,6 +94,7 @@ interface RelativeIndexable<T> {
94
94
  }
95
95
  interface String extends RelativeIndexable<string> {}
96
96
  interface Array<T> extends RelativeIndexable<T> {}
97
+ interface ReadonlyArray<T> extends RelativeIndexable<T> {}
97
98
  interface Int8Array extends RelativeIndexable<number> {}
98
99
  interface Uint8Array extends RelativeIndexable<number> {}
99
100
  interface Uint8ClampedArray extends RelativeIndexable<number> {}
@@ -158,7 +159,7 @@ declare namespace NodeJS {
158
159
  /**
159
160
  * Name of the script [if this function was defined in a script]
160
161
  */
161
- getFileName(): string | null;
162
+ getFileName(): string | undefined;
162
163
 
163
164
  /**
164
165
  * Current line number [if this function was defined in a script]
node/ts4.8/http.d.ts CHANGED
@@ -37,7 +37,7 @@
37
37
  * 'Host', 'example.com',
38
38
  * 'accepT', '*' ]
39
39
  * ```
40
- * @see [source](https://github.com/nodejs/node/blob/v20.0.0/lib/http.js)
40
+ * @see [source](https://github.com/nodejs/node/blob/v20.1.0/lib/http.js)
41
41
  */
42
42
  declare module 'http' {
43
43
  import * as stream from 'node:stream';
@@ -144,6 +144,7 @@ declare module 'http' {
144
144
  socketPath?: string | undefined;
145
145
  timeout?: number | undefined;
146
146
  uniqueHeaders?: Array<string | string[]> | undefined;
147
+ joinDuplicateHeaders?: boolean;
147
148
  }
148
149
  interface ServerOptions<
149
150
  Request extends typeof IncomingMessage = typeof IncomingMessage,
@@ -164,6 +165,12 @@ declare module 'http' {
164
165
  * @since v18.0.0
165
166
  */
166
167
  requestTimeout?: number | undefined;
168
+ /**
169
+ * It joins the field line values of multiple headers in a request with `, ` instead of discarding the duplicates.
170
+ * @default false
171
+ * @since v18.14.0
172
+ */
173
+ joinDuplicateHeaders?: boolean;
167
174
  /**
168
175
  * The number of milliseconds of inactivity a server needs to wait for additional incoming data,
169
176
  * after it has finished writing the last response, before a socket will be destroyed.
@@ -177,6 +184,13 @@ declare module 'http' {
177
184
  * @default 30000
178
185
  */
179
186
  connectionsCheckingInterval?: number | undefined;
187
+ /**
188
+ * Optionally overrides all `socket`s' `readableHighWaterMark` and `writableHighWaterMark`.
189
+ * This affects `highWaterMark` property of both `IncomingMessage` and `ServerResponse`.
190
+ * Default: @see stream.getDefaultHighWaterMark().
191
+ * @since v20.1.0
192
+ */
193
+ highWaterMark?: number | undefined;
180
194
  /**
181
195
  * Use an insecure HTTP parser that accepts invalid HTTP headers when `true`.
182
196
  * Using the insecure parser should be avoided.
@@ -336,6 +350,7 @@ declare module 'http' {
336
350
  addListener(event: 'checkExpectation', listener: RequestListener<Request, Response>): this;
337
351
  addListener(event: 'clientError', listener: (err: Error, socket: stream.Duplex) => void): this;
338
352
  addListener(event: 'connect', listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void): this;
353
+ addListener(event: 'dropRequest', listener: (req: InstanceType<Request>, socket: stream.Duplex) => void): this;
339
354
  addListener(event: 'request', listener: RequestListener<Request, Response>): this;
340
355
  addListener(event: 'upgrade', listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void): this;
341
356
  emit(event: string, ...args: any[]): boolean;
@@ -355,6 +370,7 @@ declare module 'http' {
355
370
  ): boolean;
356
371
  emit(event: 'clientError', err: Error, socket: stream.Duplex): boolean;
357
372
  emit(event: 'connect', req: InstanceType<Request>, socket: stream.Duplex, head: Buffer): boolean;
373
+ emit(event: 'dropRequest', req: InstanceType<Request>, socket: stream.Duplex): boolean;
358
374
  emit(
359
375
  event: 'request',
360
376
  req: InstanceType<Request>,
@@ -370,6 +386,7 @@ declare module 'http' {
370
386
  on(event: 'checkExpectation', listener: RequestListener<Request, Response>): this;
371
387
  on(event: 'clientError', listener: (err: Error, socket: stream.Duplex) => void): this;
372
388
  on(event: 'connect', listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void): this;
389
+ on(event: 'dropRequest', listener: (req: InstanceType<Request>, socket: stream.Duplex) => void): this;
373
390
  on(event: 'request', listener: RequestListener<Request, Response>): this;
374
391
  on(event: 'upgrade', listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void): this;
375
392
  once(event: string, listener: (...args: any[]) => void): this;
@@ -381,6 +398,7 @@ declare module 'http' {
381
398
  once(event: 'checkExpectation', listener: RequestListener<Request, Response>): this;
382
399
  once(event: 'clientError', listener: (err: Error, socket: stream.Duplex) => void): this;
383
400
  once(event: 'connect', listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void): this;
401
+ once(event: 'dropRequest', listener: (req: InstanceType<Request>, socket: stream.Duplex) => void): this;
384
402
  once(event: 'request', listener: RequestListener<Request, Response>): this;
385
403
  once(event: 'upgrade', listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void): this;
386
404
  prependListener(event: string, listener: (...args: any[]) => void): this;
@@ -392,6 +410,7 @@ declare module 'http' {
392
410
  prependListener(event: 'checkExpectation', listener: RequestListener<Request, Response>): this;
393
411
  prependListener(event: 'clientError', listener: (err: Error, socket: stream.Duplex) => void): this;
394
412
  prependListener(event: 'connect', listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void): this;
413
+ prependListener(event: 'dropRequest', listener: (req: InstanceType<Request>, socket: stream.Duplex) => void): this;
395
414
  prependListener(event: 'request', listener: RequestListener<Request, Response>): this;
396
415
  prependListener(event: 'upgrade', listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void): this;
397
416
  prependOnceListener(event: string, listener: (...args: any[]) => void): this;
@@ -403,6 +422,7 @@ declare module 'http' {
403
422
  prependOnceListener(event: 'checkExpectation', listener: RequestListener<Request, Response>): this;
404
423
  prependOnceListener(event: 'clientError', listener: (err: Error, socket: stream.Duplex) => void): this;
405
424
  prependOnceListener(event: 'connect', listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void): this;
425
+ prependOnceListener(event: 'dropRequest', listener: (req: InstanceType<Request>, socket: stream.Duplex) => void): this;
406
426
  prependOnceListener(event: 'request', listener: RequestListener<Request, Response>): this;
407
427
  prependOnceListener(event: 'upgrade', listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void): this;
408
428
  }
@@ -456,6 +476,22 @@ declare module 'http' {
456
476
  * @param value Header value
457
477
  */
458
478
  setHeader(name: string, value: number | string | ReadonlyArray<string>): this;
479
+ /**
480
+ * Append a single header value for the header object.
481
+ *
482
+ * If the value is an array, this is equivalent of calling this method multiple
483
+ * times.
484
+ *
485
+ * If there were no previous value for the header, this is equivalent of calling `outgoingMessage.setHeader(name, value)`.
486
+ *
487
+ * Depending of the value of `options.uniqueHeaders` when the client request or the
488
+ * server were created, this will end up in the header being sent multiple times or
489
+ * a single time with values joined using `; `.
490
+ * @since v18.3.0, v16.17.0
491
+ * @param name Header name
492
+ * @param value Header value
493
+ */
494
+ appendHeader(name: string, value: string | ReadonlyArray<string>): this;
459
495
  /**
460
496
  * Gets the value of the HTTP header with the given name. If that header is not
461
497
  * set, the returned value will be `undefined`.
@@ -582,6 +618,13 @@ declare module 'http' {
582
618
  * @since v0.11.8
583
619
  */
584
620
  statusMessage: string;
621
+ /**
622
+ * If set to `true`, Node.js will check whether the `Content-Length`header value and the size of the body, in bytes, are equal.
623
+ * Mismatching the `Content-Length` header value will result
624
+ * in an `Error` being thrown, identified by `code:``'ERR_HTTP_CONTENT_LENGTH_MISMATCH'`.
625
+ * @since v18.10.0, v16.18.0
626
+ */
627
+ strictContentLength: boolean;
585
628
  constructor(req: Request);
586
629
  assignSocket(socket: Socket): void;
587
630
  detachSocket(socket: Socket): void;
@@ -1049,6 +1092,21 @@ declare module 'http' {
1049
1092
  * @since v0.1.5
1050
1093
  */
1051
1094
  headers: IncomingHttpHeaders;
1095
+ /**
1096
+ * Similar to `message.headers`, but there is no join logic and the values are
1097
+ * always arrays of strings, even for headers received just once.
1098
+ *
1099
+ * ```js
1100
+ * // Prints something like:
1101
+ * //
1102
+ * // { 'user-agent': ['curl/7.22.0'],
1103
+ * // host: ['127.0.0.1:8000'],
1104
+ * // accept: ['*'] }
1105
+ * console.log(request.headersDistinct);
1106
+ * ```
1107
+ * @since v18.3.0, v16.17.0
1108
+ */
1109
+ headersDistinct: NodeJS.Dict<string[]>;
1052
1110
  /**
1053
1111
  * The raw request/response headers list exactly as they were received.
1054
1112
  *
@@ -1079,6 +1137,13 @@ declare module 'http' {
1079
1137
  * @since v0.3.0
1080
1138
  */
1081
1139
  trailers: NodeJS.Dict<string>;
1140
+ /**
1141
+ * Similar to `message.trailers`, but there is no join logic and the values are
1142
+ * always arrays of strings, even for headers received just once.
1143
+ * Only populated at the `'end'` event.
1144
+ * @since v18.3.0, v16.17.0
1145
+ */
1146
+ trailersDistinct: NodeJS.Dict<string[]>;
1082
1147
  /**
1083
1148
  * The raw request/response trailer keys and values exactly as they were
1084
1149
  * received. Only populated at the `'end'` event.
@@ -1600,7 +1665,7 @@ declare module 'http' {
1600
1665
  * }
1601
1666
  * ```
1602
1667
  * @since v14.3.0
1603
- * @param [name='Header name'] Label for error message.
1668
+ * @param [label='Header name'] Label for error message.
1604
1669
  */
1605
1670
  function validateHeaderName(name: string): void;
1606
1671
  /**
node/ts4.8/http2.d.ts CHANGED
@@ -6,7 +6,7 @@
6
6
  * const http2 = require('node:http2');
7
7
  * ```
8
8
  * @since v8.4.0
9
- * @see [source](https://github.com/nodejs/node/blob/v20.0.0/lib/http2.js)
9
+ * @see [source](https://github.com/nodejs/node/blob/v20.1.0/lib/http2.js)
10
10
  */
11
11
  declare module 'http2' {
12
12
  import EventEmitter = require('node:events');
node/ts4.8/https.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * HTTPS is the HTTP protocol over TLS/SSL. In Node.js this is implemented as a
3
3
  * separate module.
4
- * @see [source](https://github.com/nodejs/node/blob/v20.0.0/lib/https.js)
4
+ * @see [source](https://github.com/nodejs/node/blob/v20.1.0/lib/https.js)
5
5
  */
6
6
  declare module 'https' {
7
7
  import { Duplex } from 'node:stream';
node/ts4.8/inspector.d.ts CHANGED
@@ -22,7 +22,7 @@
22
22
  * ```js
23
23
  * import * as inspector from 'node:inspector';
24
24
  * ```
25
- * @see [source](https://github.com/nodejs/node/blob/v20.0.0/lib/inspector.js)
25
+ * @see [source](https://github.com/nodejs/node/blob/v20.1.0/lib/inspector.js)
26
26
  */
27
27
  declare module 'inspector' {
28
28
  import EventEmitter = require('node:events');
node/ts4.8/net.d.ts CHANGED
@@ -10,7 +10,7 @@
10
10
  * ```js
11
11
  * const net = require('node:net');
12
12
  * ```
13
- * @see [source](https://github.com/nodejs/node/blob/v20.0.0/lib/net.js)
13
+ * @see [source](https://github.com/nodejs/node/blob/v20.1.0/lib/net.js)
14
14
  */
15
15
  declare module 'net' {
16
16
  import * as stream from 'node:stream';
@@ -266,6 +266,12 @@ declare module 'net' {
266
266
  * @since v6.1.0
267
267
  */
268
268
  readonly connecting: boolean;
269
+ /**
270
+ * This is `true` if the socket is not connected yet, either because `.connect()`has not yet been called or because it is still in the process of connecting
271
+ * (see `socket.connecting`).
272
+ * @since v11.2.0, v10.16.0
273
+ */
274
+ readonly pending: boolean;
269
275
  /**
270
276
  * See `writable.destroyed` for further details.
271
277
  */
@@ -287,12 +293,6 @@ declare module 'net' {
287
293
  * @since v18.8.0, v16.18.0
288
294
  */
289
295
  readonly localFamily?: string;
290
- /**
291
- * This is `true` if the socket is not connected yet, either because `.connect()`has not yet been called or because it is still in the process of connecting
292
- * (see `socket.connecting`).
293
- * @since v11.2.0, v10.16.0
294
- */
295
- readonly pending: boolean;
296
296
  /**
297
297
  * This property represents the state of the connection as a string.
298
298
  *
node/ts4.8/os.d.ts CHANGED
@@ -5,7 +5,7 @@
5
5
  * ```js
6
6
  * const os = require('node:os');
7
7
  * ```
8
- * @see [source](https://github.com/nodejs/node/blob/v20.0.0/lib/os.js)
8
+ * @see [source](https://github.com/nodejs/node/blob/v20.1.0/lib/os.js)
9
9
  */
10
10
  declare module 'os' {
11
11
  interface CpuInfo {
node/ts4.8/path.d.ts CHANGED
@@ -13,7 +13,7 @@ declare module 'path/win32' {
13
13
  * ```js
14
14
  * const path = require('node:path');
15
15
  * ```
16
- * @see [source](https://github.com/nodejs/node/blob/v20.0.0/lib/path.js)
16
+ * @see [source](https://github.com/nodejs/node/blob/v20.1.0/lib/path.js)
17
17
  */
18
18
  declare module 'path' {
19
19
  namespace path {
@@ -27,7 +27,7 @@
27
27
  * performance.measure('A to B', 'A', 'B');
28
28
  * });
29
29
  * ```
30
- * @see [source](https://github.com/nodejs/node/blob/v20.0.0/lib/perf_hooks.js)
30
+ * @see [source](https://github.com/nodejs/node/blob/v20.1.0/lib/perf_hooks.js)
31
31
  */
32
32
  declare module 'perf_hooks' {
33
33
  import { AsyncResource } from 'node:async_hooks';
node/ts4.8/punycode.d.ts CHANGED
@@ -24,7 +24,7 @@
24
24
  * made available to developers as a convenience. Fixes or other modifications to
25
25
  * the module must be directed to the [Punycode.js](https://github.com/bestiejs/punycode.js) project.
26
26
  * @deprecated Since v7.0.0 - Deprecated
27
- * @see [source](https://github.com/nodejs/node/blob/v20.0.0/lib/punycode.js)
27
+ * @see [source](https://github.com/nodejs/node/blob/v20.1.0/lib/punycode.js)
28
28
  */
29
29
  declare module 'punycode' {
30
30
  /**
@@ -9,7 +9,7 @@
9
9
  * `querystring` is more performant than `URLSearchParams` but is not a
10
10
  * standardized API. Use `URLSearchParams` when performance is not critical or
11
11
  * when compatibility with browser code is desirable.
12
- * @see [source](https://github.com/nodejs/node/blob/v20.0.0/lib/querystring.js)
12
+ * @see [source](https://github.com/nodejs/node/blob/v20.1.0/lib/querystring.js)
13
13
  */
14
14
  declare module 'querystring' {
15
15
  interface StringifyOptions {
node/ts4.8/readline.d.ts CHANGED
@@ -30,7 +30,7 @@
30
30
  *
31
31
  * Once this code is invoked, the Node.js application will not terminate until the`readline.Interface` is closed because the interface waits for data to be
32
32
  * received on the `input` stream.
33
- * @see [source](https://github.com/nodejs/node/blob/v20.0.0/lib/readline.js)
33
+ * @see [source](https://github.com/nodejs/node/blob/v20.1.0/lib/readline.js)
34
34
  */
35
35
  declare module 'readline' {
36
36
  import { Abortable, EventEmitter } from 'node:events';
node/ts4.8/repl.d.ts CHANGED
@@ -6,7 +6,7 @@
6
6
  * ```js
7
7
  * const repl = require('node:repl');
8
8
  * ```
9
- * @see [source](https://github.com/nodejs/node/blob/v20.0.0/lib/repl.js)
9
+ * @see [source](https://github.com/nodejs/node/blob/v20.1.0/lib/repl.js)
10
10
  */
11
11
  declare module 'repl' {
12
12
  import { Interface, Completer, AsyncCompleter } from 'node:readline';
node/ts4.8/stream.d.ts CHANGED
@@ -14,7 +14,7 @@
14
14
  *
15
15
  * The `node:stream` module is useful for creating new types of stream instances.
16
16
  * It is usually not necessary to use the `node:stream` module to consume streams.
17
- * @see [source](https://github.com/nodejs/node/blob/v20.0.0/lib/stream.js)
17
+ * @see [source](https://github.com/nodejs/node/blob/v20.1.0/lib/stream.js)
18
18
  */
19
19
  declare module 'stream' {
20
20
  import { EventEmitter, Abortable } from 'node:events';
@@ -1131,6 +1131,20 @@ declare module 'stream' {
1131
1131
  * @param stream a stream to attach a signal to
1132
1132
  */
1133
1133
  function addAbortSignal<T extends Stream>(signal: AbortSignal, stream: T): T;
1134
+ /**
1135
+ * Returns the default highWaterMark used by streams.
1136
+ * Defaults to `16384` (16 KiB), or `16` for `objectMode`.
1137
+ * @since v19.9.0
1138
+ * @param objectMode
1139
+ */
1140
+ function getDefaultHighWaterMark(objectMode: boolean): number;
1141
+ /**
1142
+ * Sets the default highWaterMark used by streams.
1143
+ * @since v19.9.0
1144
+ * @param objectMode
1145
+ * @param value highWaterMark value
1146
+ */
1147
+ function setDefaultHighWaterMark(objectMode: boolean, value: number): void;
1134
1148
  interface FinishedOptions extends Abortable {
1135
1149
  error?: boolean | undefined;
1136
1150
  readable?: boolean | undefined;
@@ -36,7 +36,7 @@
36
36
  * decoder.write(Buffer.from([0x82]));
37
37
  * console.log(decoder.end(Buffer.from([0xAC])));
38
38
  * ```
39
- * @see [source](https://github.com/nodejs/node/blob/v20.0.0/lib/string_decoder.js)
39
+ * @see [source](https://github.com/nodejs/node/blob/v20.1.0/lib/string_decoder.js)
40
40
  */
41
41
  declare module 'string_decoder' {
42
42
  class StringDecoder {