@types/node 18.8.2 → 18.8.3
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 +17 -0
- node/package.json +2 -2
- node/ts4.8/http.d.ts +17 -0
node/README.md
CHANGED
|
@@ -8,7 +8,7 @@ This package contains type definitions for Node.js (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: Thu, 06 Oct 2022 18:02:54 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
13
|
* Global values: `AbortController`, `AbortSignal`, `__dirname`, `__filename`, `console`, `exports`, `gc`, `global`, `module`, `process`, `require`, `structuredClone`
|
|
14
14
|
|
node/http.d.ts
CHANGED
|
@@ -1541,6 +1541,23 @@ declare module 'http' {
|
|
|
1541
1541
|
*/
|
|
1542
1542
|
function get(options: RequestOptions | string | URL, callback?: (res: IncomingMessage) => void): ClientRequest;
|
|
1543
1543
|
function get(url: string | URL, options: RequestOptions, callback?: (res: IncomingMessage) => void): ClientRequest;
|
|
1544
|
+
/**
|
|
1545
|
+
* Performs the low-level validations on the provided name that are done when res.setHeader(name, value) is called.
|
|
1546
|
+
* Passing illegal value as name will result in a TypeError being thrown, identified by code: 'ERR_INVALID_HTTP_TOKEN'.
|
|
1547
|
+
* @param name Header name
|
|
1548
|
+
* @since v14.3.0
|
|
1549
|
+
*/
|
|
1550
|
+
function validateHeaderName(name: string): void;
|
|
1551
|
+
/**
|
|
1552
|
+
* Performs the low-level validations on the provided value that are done when res.setHeader(name, value) is called.
|
|
1553
|
+
* Passing illegal value as value will result in a TypeError being thrown.
|
|
1554
|
+
* - Undefined value error is identified by code: 'ERR_HTTP_INVALID_HEADER_VALUE'.
|
|
1555
|
+
* - Invalid value character error is identified by code: 'ERR_INVALID_CHAR'.
|
|
1556
|
+
* @param name Header name
|
|
1557
|
+
* @param value Header value
|
|
1558
|
+
* @since v14.3.0
|
|
1559
|
+
*/
|
|
1560
|
+
function validateHeaderValue(name: string, value: string): void;
|
|
1544
1561
|
let globalAgent: Agent;
|
|
1545
1562
|
/**
|
|
1546
1563
|
* Read-only property specifying the maximum allowed size of HTTP headers in bytes.
|
node/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "18.8.
|
|
3
|
+
"version": "18.8.3",
|
|
4
4
|
"description": "TypeScript definitions for Node.js",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
|
|
6
6
|
"license": "MIT",
|
|
@@ -227,6 +227,6 @@
|
|
|
227
227
|
},
|
|
228
228
|
"scripts": {},
|
|
229
229
|
"dependencies": {},
|
|
230
|
-
"typesPublisherContentHash": "
|
|
230
|
+
"typesPublisherContentHash": "3b730356514ec2d4e14259cda1b2473648cbb0b4d9854795045c8e7abd8dfd76",
|
|
231
231
|
"typeScriptVersion": "4.1"
|
|
232
232
|
}
|
node/ts4.8/http.d.ts
CHANGED
|
@@ -1541,6 +1541,23 @@ declare module 'http' {
|
|
|
1541
1541
|
*/
|
|
1542
1542
|
function get(options: RequestOptions | string | URL, callback?: (res: IncomingMessage) => void): ClientRequest;
|
|
1543
1543
|
function get(url: string | URL, options: RequestOptions, callback?: (res: IncomingMessage) => void): ClientRequest;
|
|
1544
|
+
/**
|
|
1545
|
+
* Performs the low-level validations on the provided name that are done when res.setHeader(name, value) is called.
|
|
1546
|
+
* Passing illegal value as name will result in a TypeError being thrown, identified by code: 'ERR_INVALID_HTTP_TOKEN'.
|
|
1547
|
+
* @param name Header name
|
|
1548
|
+
* @since v14.3.0
|
|
1549
|
+
*/
|
|
1550
|
+
function validateHeaderName(name: string): void;
|
|
1551
|
+
/**
|
|
1552
|
+
* Performs the low-level validations on the provided value that are done when res.setHeader(name, value) is called.
|
|
1553
|
+
* Passing illegal value as value will result in a TypeError being thrown.
|
|
1554
|
+
* - Undefined value error is identified by code: 'ERR_HTTP_INVALID_HEADER_VALUE'.
|
|
1555
|
+
* - Invalid value character error is identified by code: 'ERR_INVALID_CHAR'.
|
|
1556
|
+
* @param name Header name
|
|
1557
|
+
* @param value Header value
|
|
1558
|
+
* @since v14.3.0
|
|
1559
|
+
*/
|
|
1560
|
+
function validateHeaderValue(name: string, value: string): void;
|
|
1544
1561
|
let globalAgent: Agent;
|
|
1545
1562
|
/**
|
|
1546
1563
|
* Read-only property specifying the maximum allowed size of HTTP headers in bytes.
|