@types/node 14.18.31 → 14.18.33

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 v14.18/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/v14.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Mon, 26 Sep 2022 19:33:05 GMT
11
+ * Last updated: Wed, 26 Oct 2022 20:33:01 GMT
12
12
  * Dependencies: none
13
13
  * Global values: `AbortController`, `AbortSignal`, `Buffer`, `__dirname`, `__filename`, `clearImmediate`, `clearInterval`, `clearTimeout`, `console`, `exports`, `global`, `module`, `process`, `queueMicrotask`, `require`, `setImmediate`, `setInterval`, `setTimeout`
14
14
 
@@ -114,7 +114,7 @@ declare var AbortController: {
114
114
  declare var AbortSignal: {
115
115
  prototype: AbortSignal;
116
116
  new(): AbortSignal;
117
- // TODO: Add abort() static
117
+ abort(reason?: any): AbortSignal;
118
118
  timeout(milliseconds: number): AbortSignal;
119
119
  };
120
120
  //#endregion borrowed
node v14.18/http.d.ts CHANGED
@@ -548,6 +548,25 @@ declare module 'http' {
548
548
  ): ClientRequest;
549
549
  function get(options: RequestOptions | string | URL, callback?: (res: IncomingMessage) => void): ClientRequest;
550
550
  function get(url: string | URL, options: RequestOptions, callback?: (res: IncomingMessage) => void): ClientRequest;
551
+
552
+ /**
553
+ * Performs the low-level validations on the provided name that are done when `res.setHeader(name, value)` is called.
554
+ * Passing illegal value as name will result in a TypeError being thrown, identified by `code: 'ERR_INVALID_HTTP_TOKEN'`.
555
+ * @param name Header name
556
+ * @since v14.3.0
557
+ */
558
+ function validateHeaderName(name: string): void;
559
+ /**
560
+ * Performs the low-level validations on the provided value that are done when `res.setHeader(name, value)` is called.
561
+ * Passing illegal value as value will result in a TypeError being thrown.
562
+ * - Undefined value error is identified by `code: 'ERR_HTTP_INVALID_HEADER_VALUE'`.
563
+ * - Invalid value character error is identified by `code: 'ERR_INVALID_CHAR'`.
564
+ * @param name Header name
565
+ * @param value Header value
566
+ * @since v14.3.0
567
+ */
568
+ function validateHeaderValue(name: string, value: string): void;
569
+
551
570
  let globalAgent: Agent;
552
571
 
553
572
  /**
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "14.18.31",
3
+ "version": "14.18.33",
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": "1ac7bf247463a265174ef9aaf32e9d2b44a654c315c213361f12756e0172b745",
230
+ "typesPublisherContentHash": "132921d8fea35693f1adaf8d9110efe9ffdd29c6863478ce1130b46dae22336a",
231
231
  "typeScriptVersion": "4.1"
232
232
  }
@@ -548,6 +548,25 @@ declare module 'http' {
548
548
  ): ClientRequest;
549
549
  function get(options: RequestOptions | string | URL, callback?: (res: IncomingMessage) => void): ClientRequest;
550
550
  function get(url: string | URL, options: RequestOptions, callback?: (res: IncomingMessage) => void): ClientRequest;
551
+
552
+ /**
553
+ * Performs the low-level validations on the provided name that are done when `res.setHeader(name, value)` is called.
554
+ * Passing illegal value as name will result in a TypeError being thrown, identified by `code: 'ERR_INVALID_HTTP_TOKEN'`.
555
+ * @param name Header name
556
+ * @since v14.3.0
557
+ */
558
+ function validateHeaderName(name: string): void;
559
+ /**
560
+ * Performs the low-level validations on the provided value that are done when `res.setHeader(name, value)` is called.
561
+ * Passing illegal value as value will result in a TypeError being thrown.
562
+ * - Undefined value error is identified by `code: 'ERR_HTTP_INVALID_HEADER_VALUE'`.
563
+ * - Invalid value character error is identified by `code: 'ERR_INVALID_CHAR'`.
564
+ * @param name Header name
565
+ * @param value Header value
566
+ * @since v14.3.0
567
+ */
568
+ function validateHeaderValue(name: string, value: string): void;
569
+
551
570
  let globalAgent: Agent;
552
571
 
553
572
  /**