@types/node 18.19.56 → 18.19.57

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 v18.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/v18.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Wed, 16 Oct 2024 23:36:24 GMT
11
+ * Last updated: Sat, 19 Oct 2024 03:38:51 GMT
12
12
  * Dependencies: [undici-types](https://npmjs.com/package/undici-types)
13
13
 
14
14
  # Credits
node v18.19/http.d.ts CHANGED
@@ -587,6 +587,42 @@ declare module "http" {
587
587
  * @param value Header value
588
588
  */
589
589
  setHeader(name: string, value: number | string | readonly string[]): this;
590
+ /**
591
+ * Sets multiple header values for implicit headers. headers must be an instance of
592
+ * `Headers` or `Map`, if a header already exists in the to-be-sent headers, its
593
+ * value will be replaced.
594
+ *
595
+ * ```js
596
+ * const headers = new Headers({ foo: 'bar' });
597
+ * outgoingMessage.setHeaders(headers);
598
+ * ```
599
+ *
600
+ * or
601
+ *
602
+ * ```js
603
+ * const headers = new Map([['foo', 'bar']]);
604
+ * outgoingMessage.setHeaders(headers);
605
+ * ```
606
+ *
607
+ * When headers have been set with `outgoingMessage.setHeaders()`, they will be
608
+ * merged with any headers passed to `response.writeHead()`, with the headers passed
609
+ * to `response.writeHead()` given precedence.
610
+ *
611
+ * ```js
612
+ * // Returns content-type = text/plain
613
+ * const server = http.createServer((req, res) => {
614
+ * const headers = new Headers({ 'Content-Type': 'text/html' });
615
+ * res.setHeaders(headers);
616
+ * res.writeHead(200, { 'Content-Type': 'text/plain' });
617
+ * res.end('ok');
618
+ * });
619
+ * ```
620
+ *
621
+ * @since v19.6.0, v18.15.0
622
+ * @param name Header name
623
+ * @param value Header value
624
+ */
625
+ setHeaders(headers: Headers | Map<string, number | string | readonly string[]>): this;
590
626
  /**
591
627
  * Append a single header value for the header object.
592
628
  *
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "18.19.56",
3
+ "version": "18.19.57",
4
4
  "description": "TypeScript definitions for node",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
6
  "license": "MIT",
@@ -224,6 +224,6 @@
224
224
  "dependencies": {
225
225
  "undici-types": "~5.26.4"
226
226
  },
227
- "typesPublisherContentHash": "4ed39a97b6f2eb0f3586f8a35f0565e6337690585465bad190ea353e63c4ac27",
227
+ "typesPublisherContentHash": "73bec28904a4211aaa77e52341d860c632aeb27156702c8ba7dbc9c8e4a5da53",
228
228
  "typeScriptVersion": "4.8"
229
229
  }