@types/node 22.15.5 → 22.15.7
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/async_hooks.d.ts +64 -0
- node/http.d.ts +20 -0
- node/package.json +2 -2
- node/querystring.d.ts +2 -3
- node/stream/web.d.ts +3 -3
- node/util.d.ts +13 -0
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: Mon, 05 May 2025
|
11
|
+
* Last updated: Mon, 05 May 2025 21:02:40 GMT
|
12
12
|
* Dependencies: [undici-types](https://npmjs.com/package/undici-types)
|
13
13
|
|
14
14
|
# Credits
|
node/async_hooks.d.ts
CHANGED
@@ -533,6 +533,70 @@ declare module "async_hooks" {
|
|
533
533
|
*/
|
534
534
|
enterWith(store: T): void;
|
535
535
|
}
|
536
|
+
/**
|
537
|
+
* @since v17.2.0, v16.14.0
|
538
|
+
* @return A map of provider types to the corresponding numeric id.
|
539
|
+
* This map contains all the event types that might be emitted by the `async_hooks.init()` event.
|
540
|
+
*/
|
541
|
+
namespace asyncWrapProviders {
|
542
|
+
const NONE: number;
|
543
|
+
const DIRHANDLE: number;
|
544
|
+
const DNSCHANNEL: number;
|
545
|
+
const ELDHISTOGRAM: number;
|
546
|
+
const FILEHANDLE: number;
|
547
|
+
const FILEHANDLECLOSEREQ: number;
|
548
|
+
const FIXEDSIZEBLOBCOPY: number;
|
549
|
+
const FSEVENTWRAP: number;
|
550
|
+
const FSREQCALLBACK: number;
|
551
|
+
const FSREQPROMISE: number;
|
552
|
+
const GETADDRINFOREQWRAP: number;
|
553
|
+
const GETNAMEINFOREQWRAP: number;
|
554
|
+
const HEAPSNAPSHOT: number;
|
555
|
+
const HTTP2SESSION: number;
|
556
|
+
const HTTP2STREAM: number;
|
557
|
+
const HTTP2PING: number;
|
558
|
+
const HTTP2SETTINGS: number;
|
559
|
+
const HTTPINCOMINGMESSAGE: number;
|
560
|
+
const HTTPCLIENTREQUEST: number;
|
561
|
+
const JSSTREAM: number;
|
562
|
+
const JSUDPWRAP: number;
|
563
|
+
const MESSAGEPORT: number;
|
564
|
+
const PIPECONNECTWRAP: number;
|
565
|
+
const PIPESERVERWRAP: number;
|
566
|
+
const PIPEWRAP: number;
|
567
|
+
const PROCESSWRAP: number;
|
568
|
+
const PROMISE: number;
|
569
|
+
const QUERYWRAP: number;
|
570
|
+
const SHUTDOWNWRAP: number;
|
571
|
+
const SIGNALWRAP: number;
|
572
|
+
const STATWATCHER: number;
|
573
|
+
const STREAMPIPE: number;
|
574
|
+
const TCPCONNECTWRAP: number;
|
575
|
+
const TCPSERVERWRAP: number;
|
576
|
+
const TCPWRAP: number;
|
577
|
+
const TTYWRAP: number;
|
578
|
+
const UDPSENDWRAP: number;
|
579
|
+
const UDPWRAP: number;
|
580
|
+
const SIGINTWATCHDOG: number;
|
581
|
+
const WORKER: number;
|
582
|
+
const WORKERHEAPSNAPSHOT: number;
|
583
|
+
const WRITEWRAP: number;
|
584
|
+
const ZLIB: number;
|
585
|
+
const CHECKPRIMEREQUEST: number;
|
586
|
+
const PBKDF2REQUEST: number;
|
587
|
+
const KEYPAIRGENREQUEST: number;
|
588
|
+
const KEYGENREQUEST: number;
|
589
|
+
const KEYEXPORTREQUEST: number;
|
590
|
+
const CIPHERREQUEST: number;
|
591
|
+
const DERIVEBITSREQUEST: number;
|
592
|
+
const HASHREQUEST: number;
|
593
|
+
const RANDOMBYTESREQUEST: number;
|
594
|
+
const RANDOMPRIMEREQUEST: number;
|
595
|
+
const SCRYPTREQUEST: number;
|
596
|
+
const SIGNREQUEST: number;
|
597
|
+
const TLSWRAP: number;
|
598
|
+
const VERIFYREQUEST: number;
|
599
|
+
}
|
536
600
|
}
|
537
601
|
declare module "node:async_hooks" {
|
538
602
|
export * from "async_hooks";
|
node/http.d.ts
CHANGED
@@ -269,6 +269,13 @@ declare module "http" {
|
|
269
269
|
* @default 30000
|
270
270
|
*/
|
271
271
|
connectionsCheckingInterval?: number | undefined;
|
272
|
+
/**
|
273
|
+
* Sets the timeout value in milliseconds for receiving the complete HTTP headers from the client.
|
274
|
+
* See {@link Server.headersTimeout} for more information.
|
275
|
+
* @default 60000
|
276
|
+
* @since 18.0.0
|
277
|
+
*/
|
278
|
+
headersTimeout?: number | undefined;
|
272
279
|
/**
|
273
280
|
* Optionally overrides all `socket`s' `readableHighWaterMark` and `writableHighWaterMark`.
|
274
281
|
* This affects `highWaterMark` property of both `IncomingMessage` and `ServerResponse`.
|
@@ -296,6 +303,13 @@ declare module "http" {
|
|
296
303
|
* @since v16.5.0
|
297
304
|
*/
|
298
305
|
noDelay?: boolean | undefined;
|
306
|
+
/**
|
307
|
+
* If set to `true`, it forces the server to respond with a 400 (Bad Request) status code
|
308
|
+
* to any HTTP/1.1 request message that lacks a Host header (as mandated by the specification).
|
309
|
+
* @default true
|
310
|
+
* @since 20.0.0
|
311
|
+
*/
|
312
|
+
requireHostHeader?: boolean | undefined;
|
299
313
|
/**
|
300
314
|
* If set to `true`, it enables keep-alive functionality on the socket immediately after a new incoming connection is received,
|
301
315
|
* similarly on what is done in `socket.setKeepAlive([enable][, initialDelay])`.
|
@@ -314,6 +328,12 @@ declare module "http" {
|
|
314
328
|
* If the header's value is an array, the items will be joined using `; `.
|
315
329
|
*/
|
316
330
|
uniqueHeaders?: Array<string | string[]> | undefined;
|
331
|
+
/**
|
332
|
+
* If set to `true`, an error is thrown when writing to an HTTP response which does not have a body.
|
333
|
+
* @default false
|
334
|
+
* @since v18.17.0, v20.2.0
|
335
|
+
*/
|
336
|
+
rejectNonStandardBodyWrites?: boolean | undefined;
|
317
337
|
}
|
318
338
|
type RequestListener<
|
319
339
|
Request extends typeof IncomingMessage = typeof IncomingMessage,
|
node/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@types/node",
|
3
|
-
"version": "22.15.
|
3
|
+
"version": "22.15.7",
|
4
4
|
"description": "TypeScript definitions for node",
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
|
6
6
|
"license": "MIT",
|
@@ -220,6 +220,6 @@
|
|
220
220
|
"undici-types": "~6.21.0"
|
221
221
|
},
|
222
222
|
"peerDependencies": {},
|
223
|
-
"typesPublisherContentHash": "
|
223
|
+
"typesPublisherContentHash": "13b8f49d41ffb643d1aac1f03379392f652cc16ce419217f4de4dbe2c212e6bf",
|
224
224
|
"typeScriptVersion": "5.1"
|
225
225
|
}
|
node/querystring.d.ts
CHANGED
node/stream/web.d.ts
CHANGED
@@ -97,7 +97,7 @@ declare module "stream/web" {
|
|
97
97
|
signal?: AbortSignal;
|
98
98
|
}
|
99
99
|
interface ReadableStreamGenericReader {
|
100
|
-
readonly closed: Promise<
|
100
|
+
readonly closed: Promise<void>;
|
101
101
|
cancel(reason?: any): Promise<void>;
|
102
102
|
}
|
103
103
|
type ReadableStreamController<T> = ReadableStreamDefaultController<T>;
|
@@ -307,9 +307,9 @@ declare module "stream/web" {
|
|
307
307
|
* sink.
|
308
308
|
*/
|
309
309
|
interface WritableStreamDefaultWriter<W = any> {
|
310
|
-
readonly closed: Promise<
|
310
|
+
readonly closed: Promise<void>;
|
311
311
|
readonly desiredSize: number | null;
|
312
|
-
readonly ready: Promise<
|
312
|
+
readonly ready: Promise<void>;
|
313
313
|
abort(reason?: any): Promise<void>;
|
314
314
|
close(): Promise<void>;
|
315
315
|
releaseLock(): void;
|
node/util.d.ts
CHANGED
@@ -1466,6 +1466,18 @@ declare module "util" {
|
|
1466
1466
|
| "reset"
|
1467
1467
|
| "strikethrough"
|
1468
1468
|
| "underline";
|
1469
|
+
export interface StyleTextOptions {
|
1470
|
+
/**
|
1471
|
+
* When true, `stream` is checked to see if it can handle colors.
|
1472
|
+
* @default true
|
1473
|
+
*/
|
1474
|
+
validateStream?: boolean | undefined;
|
1475
|
+
/**
|
1476
|
+
* A stream that will be validated if it can be colored.
|
1477
|
+
* @default process.stdout
|
1478
|
+
*/
|
1479
|
+
stream?: NodeJS.WritableStream | undefined;
|
1480
|
+
}
|
1469
1481
|
/**
|
1470
1482
|
* This function returns a formatted text considering the `format` passed
|
1471
1483
|
* for printing in a terminal. It is aware of the terminal's capabilities
|
@@ -1518,6 +1530,7 @@ declare module "util" {
|
|
1518
1530
|
| Modifiers
|
1519
1531
|
| Array<ForegroundColors | BackgroundColors | Modifiers>,
|
1520
1532
|
text: string,
|
1533
|
+
options?: StyleTextOptions,
|
1521
1534
|
): string;
|
1522
1535
|
/**
|
1523
1536
|
* An implementation of the [WHATWG Encoding Standard](https://encoding.spec.whatwg.org/) `TextDecoder` API.
|