@types/node 20.19.38 → 20.19.39

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 v20.19/README.md CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for node (https://nodejs.org/).
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node/v20.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Fri, 03 Apr 2026 09:18:15 GMT
11
+ * Last updated: Fri, 03 Apr 2026 11:14:41 GMT
12
12
  * Dependencies: [undici-types](https://npmjs.com/package/undici-types)
13
13
 
14
14
  # Credits
node v20.19/net.d.ts CHANGED
@@ -111,9 +111,14 @@ declare module "net" {
111
111
  * See `Writable` stream `write()` method for more
112
112
  * information.
113
113
  * @since v0.1.90
114
- * @param [encoding='utf8'] Only used when data is `string`.
115
114
  */
116
115
  write(buffer: Uint8Array | string, cb?: (err?: Error | null) => void): boolean;
116
+ /**
117
+ * Sends data on the socket, with an explicit encoding for string data.
118
+ * @see {@link Socket.write} for full details.
119
+ * @since v0.1.90
120
+ * @param [encoding='utf8'] Only used when data is `string`.
121
+ */
117
122
  write(str: Uint8Array | string, encoding?: BufferEncoding, cb?: (err?: Error | null) => void): boolean;
118
123
  /**
119
124
  * Initiate a connection on a given socket.
@@ -353,12 +358,26 @@ declare module "net" {
353
358
  *
354
359
  * See `writable.end()` for further details.
355
360
  * @since v0.1.90
356
- * @param [encoding='utf8'] Only used when data is `string`.
357
361
  * @param callback Optional callback for when the socket is finished.
358
362
  * @return The socket itself.
359
363
  */
360
364
  end(callback?: () => void): this;
365
+ /**
366
+ * Half-closes the socket, with one final chunk of data.
367
+ * @see {@link Socket.end} for full details.
368
+ * @since v0.1.90
369
+ * @param callback Optional callback for when the socket is finished.
370
+ * @return The socket itself.
371
+ */
361
372
  end(buffer: Uint8Array | string, callback?: () => void): this;
373
+ /**
374
+ * Half-closes the socket, with one final chunk of data.
375
+ * @see {@link Socket.end} for full details.
376
+ * @since v0.1.90
377
+ * @param [encoding='utf8'] Only used when data is `string`.
378
+ * @param callback Optional callback for when the socket is finished.
379
+ * @return The socket itself.
380
+ */
362
381
  end(str: Uint8Array | string, encoding?: BufferEncoding, callback?: () => void): this;
363
382
  /**
364
383
  * events.EventEmitter
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "20.19.38",
3
+ "version": "20.19.39",
4
4
  "description": "TypeScript definitions for node",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
6
  "license": "MIT",
@@ -135,6 +135,6 @@
135
135
  "undici-types": "~6.21.0"
136
136
  },
137
137
  "peerDependencies": {},
138
- "typesPublisherContentHash": "6e3d67a181dc0915a08aad0eb475d34f39ffdec250fbb907362f7790cc3c9ff2",
138
+ "typesPublisherContentHash": "871323d2249864178e2cf14d45e1136232baed800bb0184748818383371a02fb",
139
139
  "typeScriptVersion": "5.3"
140
140
  }
node v20.19/stream.d.ts CHANGED
@@ -865,11 +865,20 @@ declare module "stream" {
865
865
  * @since v0.9.4
866
866
  * @param chunk Optional data to write. For streams not operating in object mode, `chunk` must be a {string}, {Buffer},
867
867
  * {TypedArray} or {DataView}. For object mode streams, `chunk` may be any JavaScript value other than `null`.
868
- * @param [encoding='utf8'] The encoding, if `chunk` is a string.
869
868
  * @param callback Callback for when this chunk of data is flushed.
870
869
  * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
871
870
  */
872
871
  write(chunk: any, callback?: (error: Error | null | undefined) => void): boolean;
872
+ /**
873
+ * Writes data to the stream, with an explicit encoding for string data.
874
+ * @see {@link Writable.write} for full details.
875
+ * @since v0.9.4
876
+ * @param chunk Optional data to write. For streams not operating in object mode, `chunk` must be a {string}, {Buffer},
877
+ * {TypedArray} or {DataView}. For object mode streams, `chunk` may be any JavaScript value other than `null`.
878
+ * @param encoding The encoding, if `chunk` is a string.
879
+ * @param callback Callback for when this chunk of data is flushed.
880
+ * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
881
+ */
873
882
  write(chunk: any, encoding: BufferEncoding, callback?: (error: Error | null | undefined) => void): boolean;
874
883
  /**
875
884
  * The `writable.setDefaultEncoding()` method sets the default `encoding` for a `Writable` stream.
@@ -894,13 +903,27 @@ declare module "stream" {
894
903
  * // Writing more now is not allowed!
895
904
  * ```
896
905
  * @since v0.9.4
906
+ * @param cb Callback for when the stream is finished.
907
+ */
908
+ end(cb?: () => void): this;
909
+ /**
910
+ * Signals that no more data will be written, with one final chunk of data.
911
+ * @see {@link Writable.end} for full details.
912
+ * @since v0.9.4
897
913
  * @param chunk Optional data to write. For streams not operating in object mode, `chunk` must be a {string}, {Buffer},
898
914
  * {TypedArray} or {DataView}. For object mode streams, `chunk` may be any JavaScript value other than `null`.
899
- * @param encoding The encoding if `chunk` is a string
900
- * @param callback Callback for when the stream is finished.
915
+ * @param cb Callback for when the stream is finished.
901
916
  */
902
- end(cb?: () => void): this;
903
917
  end(chunk: any, cb?: () => void): this;
918
+ /**
919
+ * Signals that no more data will be written, with one final chunk of data.
920
+ * @see {@link Writable.end} for full details.
921
+ * @since v0.9.4
922
+ * @param chunk Optional data to write. For streams not operating in object mode, `chunk` must be a {string}, {Buffer},
923
+ * {TypedArray} or {DataView}. For object mode streams, `chunk` may be any JavaScript value other than `null`.
924
+ * @param encoding The encoding if `chunk` is a string
925
+ * @param cb Callback for when the stream is finished.
926
+ */
904
927
  end(chunk: any, encoding: BufferEncoding, cb?: () => void): this;
905
928
  /**
906
929
  * The `writable.cork()` method forces all written data to be buffered in memory.