@types/node 18.11.12 → 18.11.14

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 CHANGED
@@ -8,9 +8,9 @@ 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: Thu, 08 Dec 2022 19:33:07 GMT
11
+ * Last updated: Tue, 13 Dec 2022 05:03:31 GMT
12
12
  * Dependencies: none
13
13
  * Global values: `AbortController`, `AbortSignal`, `__dirname`, `__filename`, `console`, `exports`, `gc`, `global`, `module`, `process`, `require`, `structuredClone`
14
14
 
15
15
  # Credits
16
- These definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [DefinitelyTyped](https://github.com/DefinitelyTyped), [Alberto Schiabel](https://github.com/jkomyno), [Alvis HT Tang](https://github.com/alvis), [Andrew Makarov](https://github.com/r3nya), [Benjamin Toueg](https://github.com/btoueg), [Chigozirim C.](https://github.com/smac89), [David Junger](https://github.com/touffy), [Deividas Bakanas](https://github.com/DeividasBakanas), [Eugene Y. Q. Shen](https://github.com/eyqs), [Hannes Magnusson](https://github.com/Hannes-Magnusson-CK), [Huw](https://github.com/hoo29), [Kelvin Jin](https://github.com/kjin), [Klaus Meinhardt](https://github.com/ajafff), [Lishude](https://github.com/islishude), [Mariusz Wiktorczyk](https://github.com/mwiktorczyk), [Mohsen Azimi](https://github.com/mohsen1), [Nicolas Even](https://github.com/n-e), [Nikita Galkin](https://github.com/galkin), [Parambir Singh](https://github.com/parambirs), [Sebastian Silbermann](https://github.com/eps1lon), [Simon Schick](https://github.com/SimonSchick), [Thomas den Hollander](https://github.com/ThomasdenH), [Wilco Bakker](https://github.com/WilcoBakker), [wwwy3y3](https://github.com/wwwy3y3), [Samuel Ainsworth](https://github.com/samuela), [Kyle Uehlein](https://github.com/kuehlein), [Thanik Bhongbhibhat](https://github.com/bhongy), [Marcin Kopacz](https://github.com/chyzwar), [Trivikram Kamat](https://github.com/trivikr), [Junxiao Shi](https://github.com/yoursunny), [Ilia Baryshnikov](https://github.com/qwelias), [ExE Boss](https://github.com/ExE-Boss), [Piotr Błażejewicz](https://github.com/peterblazejewicz), [Anna Henningsen](https://github.com/addaleax), [Victor Perin](https://github.com/victorperin), [Yongsheng Zhang](https://github.com/ZYSzys), [NodeJS Contributors](https://github.com/NodeJS), [Linus Unnebäck](https://github.com/LinusU), [wafuwafu13](https://github.com/wafuwafu13), and [Matteo Collina](https://github.com/mcollina).
16
+ These definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [DefinitelyTyped](https://github.com/DefinitelyTyped), [Alberto Schiabel](https://github.com/jkomyno), [Alvis HT Tang](https://github.com/alvis), [Andrew Makarov](https://github.com/r3nya), [Benjamin Toueg](https://github.com/btoueg), [Chigozirim C.](https://github.com/smac89), [David Junger](https://github.com/touffy), [Deividas Bakanas](https://github.com/DeividasBakanas), [Eugene Y. Q. Shen](https://github.com/eyqs), [Hannes Magnusson](https://github.com/Hannes-Magnusson-CK), [Huw](https://github.com/hoo29), [Kelvin Jin](https://github.com/kjin), [Klaus Meinhardt](https://github.com/ajafff), [Lishude](https://github.com/islishude), [Mariusz Wiktorczyk](https://github.com/mwiktorczyk), [Mohsen Azimi](https://github.com/mohsen1), [Nicolas Even](https://github.com/n-e), [Nikita Galkin](https://github.com/galkin), [Parambir Singh](https://github.com/parambirs), [Sebastian Silbermann](https://github.com/eps1lon), [Simon Schick](https://github.com/SimonSchick), [Thomas den Hollander](https://github.com/ThomasdenH), [Wilco Bakker](https://github.com/WilcoBakker), [wwwy3y3](https://github.com/wwwy3y3), [Samuel Ainsworth](https://github.com/samuela), [Kyle Uehlein](https://github.com/kuehlein), [Thanik Bhongbhibhat](https://github.com/bhongy), [Marcin Kopacz](https://github.com/chyzwar), [Trivikram Kamat](https://github.com/trivikr), [Junxiao Shi](https://github.com/yoursunny), [Ilia Baryshnikov](https://github.com/qwelias), [ExE Boss](https://github.com/ExE-Boss), [Piotr Błażejewicz](https://github.com/peterblazejewicz), [Anna Henningsen](https://github.com/addaleax), [Victor Perin](https://github.com/victorperin), [Yongsheng Zhang](https://github.com/ZYSzys), [NodeJS Contributors](https://github.com/NodeJS), [Linus Unnebäck](https://github.com/LinusU), [wafuwafu13](https://github.com/wafuwafu13), [Matteo Collina](https://github.com/mcollina), and [Dmitry Semigradsky](https://github.com/Semigradsky).
node/crypto.d.ts CHANGED
@@ -3131,23 +3131,23 @@ declare module 'crypto' {
3131
3131
  /**
3132
3132
  * @default 'always'
3133
3133
  */
3134
- subject: 'always' | 'never';
3134
+ subject?: 'always' | 'default' | 'never';
3135
3135
  /**
3136
3136
  * @default true
3137
3137
  */
3138
- wildcards: boolean;
3138
+ wildcards?: boolean;
3139
3139
  /**
3140
3140
  * @default true
3141
3141
  */
3142
- partialWildcards: boolean;
3142
+ partialWildcards?: boolean;
3143
3143
  /**
3144
3144
  * @default false
3145
3145
  */
3146
- multiLabelWildcards: boolean;
3146
+ multiLabelWildcards?: boolean;
3147
3147
  /**
3148
3148
  * @default false
3149
3149
  */
3150
- singleLabelSubdomains: boolean;
3150
+ singleLabelSubdomains?: boolean;
3151
3151
  }
3152
3152
  /**
3153
3153
  * Encapsulates an X509 certificate and provides read-only access to
node/http.d.ts CHANGED
@@ -43,6 +43,7 @@ declare module 'http' {
43
43
  import * as stream from 'node:stream';
44
44
  import { URL } from 'node:url';
45
45
  import { TcpSocketConnectOpts, Socket, Server as NetServer, LookupFunction } from 'node:net';
46
+ import { LookupOptions } from 'node:dns';
46
47
  // incoming headers will never contain number
47
48
  interface IncomingHttpHeaders extends NodeJS.Dict<string | string[]> {
48
49
  accept?: string | undefined;
@@ -113,56 +114,87 @@ declare module 'http' {
113
114
  type OutgoingHttpHeader = number | string | string[];
114
115
  interface OutgoingHttpHeaders extends NodeJS.Dict<OutgoingHttpHeader> {}
115
116
  interface ClientRequestArgs {
116
- signal?: AbortSignal | undefined;
117
- protocol?: string | null | undefined;
117
+ _defaultAgent?: Agent | undefined;
118
+ agent?: Agent | boolean | undefined;
119
+ auth?: string | null | undefined;
120
+ // https://github.com/nodejs/node/blob/master/lib/_http_client.js#L278
121
+ createConnection?:
122
+ | ((options: ClientRequestArgs, oncreate: (err: Error, socket: Socket) => void) => Socket)
123
+ | undefined;
124
+ defaultPort?: number | string | undefined;
125
+ family?: number | undefined;
126
+ headers?: OutgoingHttpHeaders | undefined;
127
+ hints?: LookupOptions['hints'];
118
128
  host?: string | null | undefined;
119
129
  hostname?: string | null | undefined;
120
- family?: number | undefined;
121
- port?: number | string | null | undefined;
122
- defaultPort?: number | string | undefined;
130
+ insecureHTTPParser?: boolean | undefined;
123
131
  localAddress?: string | undefined;
124
- socketPath?: string | undefined;
132
+ localPort?: number | undefined;
133
+ lookup?: LookupFunction | undefined;
125
134
  /**
126
- * @default 8192
135
+ * @default 16384
127
136
  */
128
137
  maxHeaderSize?: number | undefined;
129
138
  method?: string | undefined;
130
139
  path?: string | null | undefined;
131
- headers?: OutgoingHttpHeaders | undefined;
132
- auth?: string | null | undefined;
133
- agent?: Agent | boolean | undefined;
134
- _defaultAgent?: Agent | undefined;
135
- timeout?: number | undefined;
140
+ port?: number | string | null | undefined;
141
+ protocol?: string | null | undefined;
136
142
  setHost?: boolean | undefined;
137
- // https://github.com/nodejs/node/blob/master/lib/_http_client.js#L278
138
- createConnection?:
139
- | ((options: ClientRequestArgs, oncreate: (err: Error, socket: Socket) => void) => Socket)
140
- | undefined;
141
- lookup?: LookupFunction | undefined;
143
+ signal?: AbortSignal | undefined;
144
+ socketPath?: string | undefined;
145
+ timeout?: number | undefined;
146
+ uniqueHeaders?: Array<string | string[]> | undefined;
142
147
  }
143
148
  interface ServerOptions<
144
149
  Request extends typeof IncomingMessage = typeof IncomingMessage,
145
150
  Response extends typeof ServerResponse = typeof ServerResponse,
146
151
  > {
152
+ /**
153
+ * Specifies the `IncomingMessage` class to be used. Useful for extending the original `IncomingMessage`.
154
+ */
147
155
  IncomingMessage?: Request | undefined;
156
+ /**
157
+ * Specifies the `ServerResponse` class to be used. Useful for extending the original `ServerResponse`.
158
+ */
148
159
  ServerResponse?: Response | undefined;
149
160
  /**
150
- * Optionally overrides the value of
151
- * `--max-http-header-size` for requests received by this server, i.e.
152
- * the maximum length of request headers in bytes.
153
- * @default 8192
161
+ * Sets the timeout value in milliseconds for receiving the entire request from the client.
162
+ * @see Server.requestTimeout for more information.
163
+ * @default 300000
164
+ * @since v18.0.0
154
165
  */
155
- maxHeaderSize?: number | undefined;
166
+ requestTimeout?: number | undefined;
156
167
  /**
157
- * Use an insecure HTTP parser that accepts invalid HTTP headers when true.
168
+ * The number of milliseconds of inactivity a server needs to wait for additional incoming data,
169
+ * after it has finished writing the last response, before a socket will be destroyed.
170
+ * @see Server.keepAliveTimeout for more information.
171
+ * @default 5000
172
+ * @since v18.0.0
173
+ */
174
+ keepAliveTimeout?: number | undefined;
175
+ /**
176
+ * Sets the interval value in milliseconds to check for request and headers timeout in incomplete requests.
177
+ * @default 30000
178
+ */
179
+ connectionsCheckingInterval?: number | undefined;
180
+ /**
181
+ * Use an insecure HTTP parser that accepts invalid HTTP headers when `true`.
158
182
  * Using the insecure parser should be avoided.
159
183
  * See --insecure-http-parser for more information.
160
184
  * @default false
161
185
  */
162
186
  insecureHTTPParser?: boolean | undefined;
187
+ /**
188
+ * Optionally overrides the value of
189
+ * `--max-http-header-size` for requests received by this server, i.e.
190
+ * the maximum length of request headers in bytes.
191
+ * @default 16384
192
+ * @since v13.3.0
193
+ */
194
+ maxHeaderSize?: number | undefined;
163
195
  /**
164
196
  * If set to `true`, it disables the use of Nagle's algorithm immediately after a new incoming connection is received.
165
- * @default false
197
+ * @default true
166
198
  * @since v16.5.0
167
199
  */
168
200
  noDelay?: boolean | undefined;
@@ -179,6 +211,11 @@ declare module 'http' {
179
211
  * @since v16.5.0
180
212
  */
181
213
  keepAliveInitialDelay?: number | undefined;
214
+ /**
215
+ * A list of response headers that should be sent only once.
216
+ * If the header's value is an array, the items will be joined using `; `.
217
+ */
218
+ uniqueHeaders?: Array<string | string[]> | undefined;
182
219
  }
183
220
  type RequestListener<
184
221
  Request extends typeof IncomingMessage = typeof IncomingMessage,
node/index.d.ts CHANGED
@@ -41,6 +41,7 @@
41
41
  // Linus Unnebäck <https://github.com/LinusU>
42
42
  // wafuwafu13 <https://github.com/wafuwafu13>
43
43
  // Matteo Collina <https://github.com/mcollina>
44
+ // Dmitry Semigradsky <https://github.com/Semigradsky>
44
45
  // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
45
46
 
46
47
  /**
node/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "18.11.12",
3
+ "version": "18.11.14",
4
4
  "description": "TypeScript definitions for Node.js",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
6
  "license": "MIT",
@@ -209,6 +209,11 @@
209
209
  "name": "Matteo Collina",
210
210
  "url": "https://github.com/mcollina",
211
211
  "githubUsername": "mcollina"
212
+ },
213
+ {
214
+ "name": "Dmitry Semigradsky",
215
+ "url": "https://github.com/Semigradsky",
216
+ "githubUsername": "Semigradsky"
212
217
  }
213
218
  ],
214
219
  "main": "",
@@ -227,6 +232,6 @@
227
232
  },
228
233
  "scripts": {},
229
234
  "dependencies": {},
230
- "typesPublisherContentHash": "2ed250cec160c67c38316dcb3b85ce697b127871af3e4202c93f1e00d50af82c",
235
+ "typesPublisherContentHash": "7f201091dbfb9aae14c77a3a70ce60a50c58635220c8ad67b451b06664209517",
231
236
  "typeScriptVersion": "4.2"
232
237
  }
node/ts4.8/crypto.d.ts CHANGED
@@ -3131,23 +3131,23 @@ declare module 'crypto' {
3131
3131
  /**
3132
3132
  * @default 'always'
3133
3133
  */
3134
- subject: 'always' | 'never';
3134
+ subject?: 'always' | 'default' | 'never';
3135
3135
  /**
3136
3136
  * @default true
3137
3137
  */
3138
- wildcards: boolean;
3138
+ wildcards?: boolean;
3139
3139
  /**
3140
3140
  * @default true
3141
3141
  */
3142
- partialWildcards: boolean;
3142
+ partialWildcards?: boolean;
3143
3143
  /**
3144
3144
  * @default false
3145
3145
  */
3146
- multiLabelWildcards: boolean;
3146
+ multiLabelWildcards?: boolean;
3147
3147
  /**
3148
3148
  * @default false
3149
3149
  */
3150
- singleLabelSubdomains: boolean;
3150
+ singleLabelSubdomains?: boolean;
3151
3151
  }
3152
3152
  /**
3153
3153
  * Encapsulates an X509 certificate and provides read-only access to
node/ts4.8/http.d.ts CHANGED
@@ -43,6 +43,7 @@ declare module 'http' {
43
43
  import * as stream from 'node:stream';
44
44
  import { URL } from 'node:url';
45
45
  import { TcpSocketConnectOpts, Socket, Server as NetServer, LookupFunction } from 'node:net';
46
+ import { LookupOptions } from 'node:dns';
46
47
  // incoming headers will never contain number
47
48
  interface IncomingHttpHeaders extends NodeJS.Dict<string | string[]> {
48
49
  accept?: string | undefined;
@@ -113,56 +114,87 @@ declare module 'http' {
113
114
  type OutgoingHttpHeader = number | string | string[];
114
115
  interface OutgoingHttpHeaders extends NodeJS.Dict<OutgoingHttpHeader> {}
115
116
  interface ClientRequestArgs {
116
- signal?: AbortSignal | undefined;
117
- protocol?: string | null | undefined;
117
+ _defaultAgent?: Agent | undefined;
118
+ agent?: Agent | boolean | undefined;
119
+ auth?: string | null | undefined;
120
+ // https://github.com/nodejs/node/blob/master/lib/_http_client.js#L278
121
+ createConnection?:
122
+ | ((options: ClientRequestArgs, oncreate: (err: Error, socket: Socket) => void) => Socket)
123
+ | undefined;
124
+ defaultPort?: number | string | undefined;
125
+ family?: number | undefined;
126
+ headers?: OutgoingHttpHeaders | undefined;
127
+ hints?: LookupOptions['hints'];
118
128
  host?: string | null | undefined;
119
129
  hostname?: string | null | undefined;
120
- family?: number | undefined;
121
- port?: number | string | null | undefined;
122
- defaultPort?: number | string | undefined;
130
+ insecureHTTPParser?: boolean | undefined;
123
131
  localAddress?: string | undefined;
124
- socketPath?: string | undefined;
132
+ localPort?: number | undefined;
133
+ lookup?: LookupFunction | undefined;
125
134
  /**
126
- * @default 8192
135
+ * @default 16384
127
136
  */
128
137
  maxHeaderSize?: number | undefined;
129
138
  method?: string | undefined;
130
139
  path?: string | null | undefined;
131
- headers?: OutgoingHttpHeaders | undefined;
132
- auth?: string | null | undefined;
133
- agent?: Agent | boolean | undefined;
134
- _defaultAgent?: Agent | undefined;
135
- timeout?: number | undefined;
140
+ port?: number | string | null | undefined;
141
+ protocol?: string | null | undefined;
136
142
  setHost?: boolean | undefined;
137
- // https://github.com/nodejs/node/blob/master/lib/_http_client.js#L278
138
- createConnection?:
139
- | ((options: ClientRequestArgs, oncreate: (err: Error, socket: Socket) => void) => Socket)
140
- | undefined;
141
- lookup?: LookupFunction | undefined;
143
+ signal?: AbortSignal | undefined;
144
+ socketPath?: string | undefined;
145
+ timeout?: number | undefined;
146
+ uniqueHeaders?: Array<string | string[]> | undefined;
142
147
  }
143
148
  interface ServerOptions<
144
149
  Request extends typeof IncomingMessage = typeof IncomingMessage,
145
150
  Response extends typeof ServerResponse = typeof ServerResponse,
146
151
  > {
152
+ /**
153
+ * Specifies the `IncomingMessage` class to be used. Useful for extending the original `IncomingMessage`.
154
+ */
147
155
  IncomingMessage?: Request | undefined;
156
+ /**
157
+ * Specifies the `ServerResponse` class to be used. Useful for extending the original `ServerResponse`.
158
+ */
148
159
  ServerResponse?: Response | undefined;
149
160
  /**
150
- * Optionally overrides the value of
151
- * `--max-http-header-size` for requests received by this server, i.e.
152
- * the maximum length of request headers in bytes.
153
- * @default 8192
161
+ * Sets the timeout value in milliseconds for receiving the entire request from the client.
162
+ * @see Server.requestTimeout for more information.
163
+ * @default 300000
164
+ * @since v18.0.0
154
165
  */
155
- maxHeaderSize?: number | undefined;
166
+ requestTimeout?: number | undefined;
156
167
  /**
157
- * Use an insecure HTTP parser that accepts invalid HTTP headers when true.
168
+ * The number of milliseconds of inactivity a server needs to wait for additional incoming data,
169
+ * after it has finished writing the last response, before a socket will be destroyed.
170
+ * @see Server.keepAliveTimeout for more information.
171
+ * @default 5000
172
+ * @since v18.0.0
173
+ */
174
+ keepAliveTimeout?: number | undefined;
175
+ /**
176
+ * Sets the interval value in milliseconds to check for request and headers timeout in incomplete requests.
177
+ * @default 30000
178
+ */
179
+ connectionsCheckingInterval?: number | undefined;
180
+ /**
181
+ * Use an insecure HTTP parser that accepts invalid HTTP headers when `true`.
158
182
  * Using the insecure parser should be avoided.
159
183
  * See --insecure-http-parser for more information.
160
184
  * @default false
161
185
  */
162
186
  insecureHTTPParser?: boolean | undefined;
187
+ /**
188
+ * Optionally overrides the value of
189
+ * `--max-http-header-size` for requests received by this server, i.e.
190
+ * the maximum length of request headers in bytes.
191
+ * @default 16384
192
+ * @since v13.3.0
193
+ */
194
+ maxHeaderSize?: number | undefined;
163
195
  /**
164
196
  * If set to `true`, it disables the use of Nagle's algorithm immediately after a new incoming connection is received.
165
- * @default false
197
+ * @default true
166
198
  * @since v16.5.0
167
199
  */
168
200
  noDelay?: boolean | undefined;
@@ -179,6 +211,11 @@ declare module 'http' {
179
211
  * @since v16.5.0
180
212
  */
181
213
  keepAliveInitialDelay?: number | undefined;
214
+ /**
215
+ * A list of response headers that should be sent only once.
216
+ * If the header's value is an array, the items will be joined using `; `.
217
+ */
218
+ uniqueHeaders?: Array<string | string[]> | undefined;
182
219
  }
183
220
  type RequestListener<
184
221
  Request extends typeof IncomingMessage = typeof IncomingMessage,