@types/node 18.11.13 → 18.11.15
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 +2 -2
- node/crypto.d.ts +1 -1
- node/http.d.ts +61 -24
- node/index.d.ts +1 -0
- node/package.json +7 -2
- node/ts4.8/crypto.d.ts +1 -1
- node/ts4.8/http.d.ts +61 -24
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:
|
|
11
|
+
* Last updated: Tue, 13 Dec 2022 21:03:28 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),
|
|
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
|
@@ -2357,7 +2357,7 @@ declare module 'crypto' {
|
|
|
2357
2357
|
/** @deprecated since v10.0.0 */
|
|
2358
2358
|
const DEFAULT_ENCODING: BufferEncoding;
|
|
2359
2359
|
type KeyType = 'rsa' | 'rsa-pss' | 'dsa' | 'ec' | 'ed25519' | 'ed448' | 'x25519' | 'x448';
|
|
2360
|
-
type KeyFormat = 'pem' | 'der';
|
|
2360
|
+
type KeyFormat = 'pem' | 'der' | 'jwk';
|
|
2361
2361
|
interface BasePrivateKeyEncodingOptions<T extends KeyFormat> {
|
|
2362
2362
|
format: T;
|
|
2363
2363
|
cipher?: string | undefined;
|
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
|
-
|
|
117
|
-
|
|
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
|
-
|
|
121
|
-
port?: number | string | null | undefined;
|
|
122
|
-
defaultPort?: number | string | undefined;
|
|
130
|
+
insecureHTTPParser?: boolean | undefined;
|
|
123
131
|
localAddress?: string | undefined;
|
|
124
|
-
|
|
132
|
+
localPort?: number | undefined;
|
|
133
|
+
lookup?: LookupFunction | undefined;
|
|
125
134
|
/**
|
|
126
|
-
* @default
|
|
135
|
+
* @default 16384
|
|
127
136
|
*/
|
|
128
137
|
maxHeaderSize?: number | undefined;
|
|
129
138
|
method?: string | undefined;
|
|
130
139
|
path?: string | null | undefined;
|
|
131
|
-
|
|
132
|
-
|
|
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
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
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
|
-
*
|
|
151
|
-
*
|
|
152
|
-
*
|
|
153
|
-
* @
|
|
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
|
-
|
|
166
|
+
requestTimeout?: number | undefined;
|
|
156
167
|
/**
|
|
157
|
-
*
|
|
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
|
|
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.
|
|
3
|
+
"version": "18.11.15",
|
|
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": "
|
|
235
|
+
"typesPublisherContentHash": "b7e8091addea0e147932a20cafdc84263043cfcbd5e95a43955a99bd6c391b2b",
|
|
231
236
|
"typeScriptVersion": "4.2"
|
|
232
237
|
}
|
node/ts4.8/crypto.d.ts
CHANGED
|
@@ -2357,7 +2357,7 @@ declare module 'crypto' {
|
|
|
2357
2357
|
/** @deprecated since v10.0.0 */
|
|
2358
2358
|
const DEFAULT_ENCODING: BufferEncoding;
|
|
2359
2359
|
type KeyType = 'rsa' | 'rsa-pss' | 'dsa' | 'ec' | 'ed25519' | 'ed448' | 'x25519' | 'x448';
|
|
2360
|
-
type KeyFormat = 'pem' | 'der';
|
|
2360
|
+
type KeyFormat = 'pem' | 'der' | 'jwk';
|
|
2361
2361
|
interface BasePrivateKeyEncodingOptions<T extends KeyFormat> {
|
|
2362
2362
|
format: T;
|
|
2363
2363
|
cipher?: string | undefined;
|
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
|
-
|
|
117
|
-
|
|
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
|
-
|
|
121
|
-
port?: number | string | null | undefined;
|
|
122
|
-
defaultPort?: number | string | undefined;
|
|
130
|
+
insecureHTTPParser?: boolean | undefined;
|
|
123
131
|
localAddress?: string | undefined;
|
|
124
|
-
|
|
132
|
+
localPort?: number | undefined;
|
|
133
|
+
lookup?: LookupFunction | undefined;
|
|
125
134
|
/**
|
|
126
|
-
* @default
|
|
135
|
+
* @default 16384
|
|
127
136
|
*/
|
|
128
137
|
maxHeaderSize?: number | undefined;
|
|
129
138
|
method?: string | undefined;
|
|
130
139
|
path?: string | null | undefined;
|
|
131
|
-
|
|
132
|
-
|
|
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
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
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
|
-
*
|
|
151
|
-
*
|
|
152
|
-
*
|
|
153
|
-
* @
|
|
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
|
-
|
|
166
|
+
requestTimeout?: number | undefined;
|
|
156
167
|
/**
|
|
157
|
-
*
|
|
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
|
|
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,
|