@types/node 22.13.10 → 22.13.12
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 +1 -1
- node/http.d.ts +2 -2
- node/package.json +2 -2
- node/stream/consumers.d.ts +32 -6
node/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.
|
9
9
|
|
10
10
|
### Additional Details
|
11
|
-
* Last updated:
|
11
|
+
* Last updated: Mon, 24 Mar 2025 06:38:58 GMT
|
12
12
|
* Dependencies: [undici-types](https://npmjs.com/package/undici-types)
|
13
13
|
|
14
14
|
# Credits
|
node/http.d.ts
CHANGED
@@ -342,8 +342,8 @@ declare module "http" {
|
|
342
342
|
* @since v0.9.12
|
343
343
|
* @param [msecs=0 (no timeout)]
|
344
344
|
*/
|
345
|
-
setTimeout(msecs?: number, callback?: () => void): this;
|
346
|
-
setTimeout(callback: () => void): this;
|
345
|
+
setTimeout(msecs?: number, callback?: (socket: Socket) => void): this;
|
346
|
+
setTimeout(callback: (socket: Socket) => void): this;
|
347
347
|
/**
|
348
348
|
* Limits maximum incoming headers count. If set to 0, no limit will be applied.
|
349
349
|
* @since v0.7.0
|
node/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@types/node",
|
3
|
-
"version": "22.13.
|
3
|
+
"version": "22.13.12",
|
4
4
|
"description": "TypeScript definitions for node",
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
|
6
6
|
"license": "MIT",
|
@@ -215,6 +215,6 @@
|
|
215
215
|
"undici-types": "~6.20.0"
|
216
216
|
},
|
217
217
|
"peerDependencies": {},
|
218
|
-
"typesPublisherContentHash": "
|
218
|
+
"typesPublisherContentHash": "df059e6bcc9e1ec441a1d7dc7b3f7d2985cf06b4cb84f9b760acb4a24d63d97e",
|
219
219
|
"typeScriptVersion": "5.0"
|
220
220
|
}
|
node/stream/consumers.d.ts
CHANGED
@@ -1,11 +1,37 @@
|
|
1
|
+
/**
|
2
|
+
* The utility consumer functions provide common options for consuming
|
3
|
+
* streams.
|
4
|
+
* @since v16.7.0
|
5
|
+
*/
|
1
6
|
declare module "stream/consumers" {
|
2
7
|
import { Blob as NodeBlob } from "node:buffer";
|
3
|
-
import {
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
function
|
8
|
+
import { ReadableStream as WebReadableStream } from "node:stream/web";
|
9
|
+
/**
|
10
|
+
* @since v16.7.0
|
11
|
+
* @returns Fulfills with an `ArrayBuffer` containing the full contents of the stream.
|
12
|
+
*/
|
13
|
+
function arrayBuffer(stream: WebReadableStream | NodeJS.ReadableStream | AsyncIterable<any>): Promise<ArrayBuffer>;
|
14
|
+
/**
|
15
|
+
* @since v16.7.0
|
16
|
+
* @returns Fulfills with a `Blob` containing the full contents of the stream.
|
17
|
+
*/
|
18
|
+
function blob(stream: WebReadableStream | NodeJS.ReadableStream | AsyncIterable<any>): Promise<NodeBlob>;
|
19
|
+
/**
|
20
|
+
* @since v16.7.0
|
21
|
+
* @returns Fulfills with a `Buffer` containing the full contents of the stream.
|
22
|
+
*/
|
23
|
+
function buffer(stream: WebReadableStream | NodeJS.ReadableStream | AsyncIterable<any>): Promise<Buffer>;
|
24
|
+
/**
|
25
|
+
* @since v16.7.0
|
26
|
+
* @returns Fulfills with the contents of the stream parsed as a
|
27
|
+
* UTF-8 encoded string that is then passed through `JSON.parse()`.
|
28
|
+
*/
|
29
|
+
function json(stream: WebReadableStream | NodeJS.ReadableStream | AsyncIterable<any>): Promise<unknown>;
|
30
|
+
/**
|
31
|
+
* @since v16.7.0
|
32
|
+
* @returns Fulfills with the contents of the stream parsed as a UTF-8 encoded string.
|
33
|
+
*/
|
34
|
+
function text(stream: WebReadableStream | NodeJS.ReadableStream | AsyncIterable<any>): Promise<string>;
|
9
35
|
}
|
10
36
|
declare module "node:stream/consumers" {
|
11
37
|
export * from "stream/consumers";
|