@types/node 16.18.54 → 16.18.56
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 v16.18/README.md +1 -1
- node v16.18/events.d.ts +50 -0
- node v16.18/http.d.ts +81 -1
- node v16.18/package.json +2 -2
- node v16.18/ts4.8/http.d.ts +81 -1
node v16.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/v16.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated:
|
|
11
|
+
* Last updated: Mon, 02 Oct 2023 20:06:22 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
13
|
* Global values: `AbortController`, `AbortSignal`, `__dirname`, `__filename`, `console`, `exports`, `gc`, `global`, `module`, `process`, `require`
|
|
14
14
|
|
node v16.18/events.d.ts
CHANGED
|
@@ -35,6 +35,8 @@
|
|
|
35
35
|
* @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/events.js)
|
|
36
36
|
*/
|
|
37
37
|
declare module "events" {
|
|
38
|
+
import { AsyncResource, AsyncResourceOptions } from "node:async_hooks";
|
|
39
|
+
|
|
38
40
|
interface EventEmitterOptions {
|
|
39
41
|
/**
|
|
40
42
|
* Enables automatic capturing of promise rejection.
|
|
@@ -72,6 +74,9 @@ declare module "events" {
|
|
|
72
74
|
*/
|
|
73
75
|
class EventEmitter {
|
|
74
76
|
constructor(options?: EventEmitterOptions);
|
|
77
|
+
|
|
78
|
+
[EventEmitter.captureRejectionSymbol]?(error: Error, event: string, ...args: any[]): void;
|
|
79
|
+
|
|
75
80
|
/**
|
|
76
81
|
* Creates a `Promise` that is fulfilled when the `EventEmitter` emits the given
|
|
77
82
|
* event or that is rejected if the `EventEmitter` emits `'error'` while waiting.
|
|
@@ -314,10 +319,55 @@ declare module "events" {
|
|
|
314
319
|
*/
|
|
315
320
|
signal?: AbortSignal | undefined;
|
|
316
321
|
}
|
|
322
|
+
|
|
323
|
+
export interface EventEmitterReferencingAsyncResource extends AsyncResource {
|
|
324
|
+
readonly eventEmitter: EventEmitterAsyncResource;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
export interface EventEmitterAsyncResourceOptions extends AsyncResourceOptions, EventEmitterOptions {
|
|
328
|
+
/**
|
|
329
|
+
* The type of async event, this is required when instantiating `EventEmitterAsyncResource`
|
|
330
|
+
* directly rather than as a child class.
|
|
331
|
+
* @default new.target.name if instantiated as a child class.
|
|
332
|
+
*/
|
|
333
|
+
name?: string;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
/**
|
|
337
|
+
* Integrates `EventEmitter` with `AsyncResource` for `EventEmitter`s that require
|
|
338
|
+
* manual async tracking. Specifically, all events emitted by instances of
|
|
339
|
+
* `EventEmitterAsyncResource` will run within its async context.
|
|
340
|
+
*
|
|
341
|
+
* The EventEmitterAsyncResource class has the same methods and takes the
|
|
342
|
+
* same options as EventEmitter and AsyncResource themselves.
|
|
343
|
+
* @throws if `options.name` is not provided when instantiated directly.
|
|
344
|
+
* @since v17.4.0, v16.14.0
|
|
345
|
+
*/
|
|
346
|
+
export class EventEmitterAsyncResource extends EventEmitter {
|
|
347
|
+
/**
|
|
348
|
+
* @param options Only optional in child class.
|
|
349
|
+
*/
|
|
350
|
+
constructor(options?: EventEmitterAsyncResourceOptions);
|
|
351
|
+
/**
|
|
352
|
+
* Call all destroy hooks. This should only ever be called once. An
|
|
353
|
+
* error will be thrown if it is called more than once. This must be
|
|
354
|
+
* manually called. If the resource is left to be collected by the GC then
|
|
355
|
+
* the destroy hooks will never be called.
|
|
356
|
+
*/
|
|
357
|
+
emitDestroy(): void;
|
|
358
|
+
/** The unique asyncId assigned to the resource. */
|
|
359
|
+
readonly asyncId: number;
|
|
360
|
+
/** The same triggerAsyncId that is passed to the AsyncResource constructor. */
|
|
361
|
+
readonly triggerAsyncId: number;
|
|
362
|
+
/** The underlying AsyncResource */
|
|
363
|
+
readonly asyncResource: EventEmitterReferencingAsyncResource;
|
|
364
|
+
}
|
|
317
365
|
}
|
|
318
366
|
global {
|
|
319
367
|
namespace NodeJS {
|
|
320
368
|
interface EventEmitter {
|
|
369
|
+
|
|
370
|
+
[EventEmitter.captureRejectionSymbol]?(error: Error, event: string, ...args: any[]): void;
|
|
321
371
|
/**
|
|
322
372
|
* Alias for `emitter.on(eventName, listener)`.
|
|
323
373
|
* @since v0.1.26
|
node v16.18/http.d.ts
CHANGED
|
@@ -112,7 +112,87 @@ declare module "http" {
|
|
|
112
112
|
}
|
|
113
113
|
// outgoing headers allows numbers (as they are converted internally to strings)
|
|
114
114
|
type OutgoingHttpHeader = number | string | string[];
|
|
115
|
-
interface OutgoingHttpHeaders extends NodeJS.Dict<OutgoingHttpHeader> {
|
|
115
|
+
interface OutgoingHttpHeaders extends NodeJS.Dict<OutgoingHttpHeader> {
|
|
116
|
+
accept?: string | string[] | undefined;
|
|
117
|
+
'accept-charset'?: string | string[] | undefined;
|
|
118
|
+
'accept-encoding'?: string | string[] | undefined;
|
|
119
|
+
'accept-language'?: string | string[] | undefined;
|
|
120
|
+
'accept-ranges'?: string | undefined;
|
|
121
|
+
'access-control-allow-credentials'?: string | undefined;
|
|
122
|
+
'access-control-allow-headers'?: string | undefined;
|
|
123
|
+
'access-control-allow-methods'?: string | undefined;
|
|
124
|
+
'access-control-allow-origin'?: string | undefined;
|
|
125
|
+
'access-control-expose-headers'?: string | undefined;
|
|
126
|
+
'access-control-max-age'?: string | undefined;
|
|
127
|
+
'access-control-request-headers'?: string | undefined;
|
|
128
|
+
'access-control-request-method'?: string | undefined;
|
|
129
|
+
age?: string | undefined;
|
|
130
|
+
allow?: string | undefined;
|
|
131
|
+
authorization?: string | undefined;
|
|
132
|
+
'cache-control'?: string | undefined;
|
|
133
|
+
'cdn-cache-control'?: string | undefined;
|
|
134
|
+
connection?: string | string[] | undefined;
|
|
135
|
+
'content-disposition'?: string | undefined;
|
|
136
|
+
'content-encoding'?: string | undefined;
|
|
137
|
+
'content-language'?: string | undefined;
|
|
138
|
+
'content-length'?: string | number | undefined;
|
|
139
|
+
'content-location'?: string | undefined;
|
|
140
|
+
'content-range'?: string | undefined;
|
|
141
|
+
'content-security-policy'?: string | undefined;
|
|
142
|
+
'content-security-policy-report-only'?: string | undefined;
|
|
143
|
+
cookie?: string | string[] | undefined;
|
|
144
|
+
dav?: string | string[] | undefined;
|
|
145
|
+
dnt?: string | undefined;
|
|
146
|
+
date?: string | undefined;
|
|
147
|
+
etag?: string | undefined;
|
|
148
|
+
expect?: string | undefined;
|
|
149
|
+
expires?: string | undefined;
|
|
150
|
+
forwarded?: string | undefined;
|
|
151
|
+
from?: string | undefined;
|
|
152
|
+
host?: string | undefined;
|
|
153
|
+
'if-match'?: string | undefined;
|
|
154
|
+
'if-modified-since'?: string | undefined;
|
|
155
|
+
'if-none-match'?: string | undefined;
|
|
156
|
+
'if-range'?: string | undefined;
|
|
157
|
+
'if-unmodified-since'?: string | undefined;
|
|
158
|
+
'last-modified'?: string | undefined;
|
|
159
|
+
link?: string | string[] | undefined;
|
|
160
|
+
location?: string | undefined;
|
|
161
|
+
'max-forwards'?: string | undefined;
|
|
162
|
+
origin?: string | undefined;
|
|
163
|
+
prgama?: string | string[] | undefined;
|
|
164
|
+
'proxy-authenticate'?: string | string[] | undefined;
|
|
165
|
+
'proxy-authorization'?: string | undefined;
|
|
166
|
+
'public-key-pins'?: string | undefined;
|
|
167
|
+
'public-key-pins-report-only'?: string | undefined;
|
|
168
|
+
range?: string | undefined;
|
|
169
|
+
referer?: string | undefined;
|
|
170
|
+
'referrer-policy'?: string | undefined;
|
|
171
|
+
refresh?: string | undefined;
|
|
172
|
+
'retry-after'?: string | undefined;
|
|
173
|
+
'sec-websocket-accept'?: string | undefined;
|
|
174
|
+
'sec-websocket-extensions'?: string | string[] | undefined;
|
|
175
|
+
'sec-websocket-key'?: string | undefined;
|
|
176
|
+
'sec-websocket-protocol'?: string | string[] | undefined;
|
|
177
|
+
'sec-websocket-version'?: string | undefined;
|
|
178
|
+
server?: string | undefined;
|
|
179
|
+
'set-cookie'?: string | string[] | undefined;
|
|
180
|
+
'strict-transport-security'?: string | undefined;
|
|
181
|
+
te?: string | undefined;
|
|
182
|
+
trailer?: string | undefined;
|
|
183
|
+
'transfer-encoding'?: string | undefined;
|
|
184
|
+
'user-agent'?: string | undefined;
|
|
185
|
+
upgrade?: string | undefined;
|
|
186
|
+
'upgrade-insecure-requests'?: string | undefined;
|
|
187
|
+
vary?: string | undefined;
|
|
188
|
+
via?: string | string[] | undefined;
|
|
189
|
+
warning?: string | undefined;
|
|
190
|
+
'www-authenticate'?: string | string[] | undefined;
|
|
191
|
+
'x-content-type-options'?: string | undefined;
|
|
192
|
+
'x-dns-prefetch-control'?: string | undefined;
|
|
193
|
+
'x-frame-options'?: string | undefined;
|
|
194
|
+
'x-xss-protection'?: string | undefined;
|
|
195
|
+
}
|
|
116
196
|
interface ClientRequestArgs {
|
|
117
197
|
signal?: AbortSignal | undefined;
|
|
118
198
|
protocol?: string | null | undefined;
|
node v16.18/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "16.18.
|
|
3
|
+
"version": "16.18.56",
|
|
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": "2c49c7d6d7eb484328038463ac5d197cc05a37149928fec4bbec5fe6cc298a73",
|
|
231
231
|
"typeScriptVersion": "4.5"
|
|
232
232
|
}
|
node v16.18/ts4.8/http.d.ts
CHANGED
|
@@ -111,7 +111,87 @@ declare module "http" {
|
|
|
111
111
|
}
|
|
112
112
|
// outgoing headers allows numbers (as they are converted internally to strings)
|
|
113
113
|
type OutgoingHttpHeader = number | string | string[];
|
|
114
|
-
interface OutgoingHttpHeaders extends NodeJS.Dict<OutgoingHttpHeader> {
|
|
114
|
+
interface OutgoingHttpHeaders extends NodeJS.Dict<OutgoingHttpHeader> {
|
|
115
|
+
accept?: string | string[] | undefined;
|
|
116
|
+
'accept-charset'?: string | string[] | undefined;
|
|
117
|
+
'accept-encoding'?: string | string[] | undefined;
|
|
118
|
+
'accept-language'?: string | string[] | undefined;
|
|
119
|
+
'accept-ranges'?: string | undefined;
|
|
120
|
+
'access-control-allow-credentials'?: string | undefined;
|
|
121
|
+
'access-control-allow-headers'?: string | undefined;
|
|
122
|
+
'access-control-allow-methods'?: string | undefined;
|
|
123
|
+
'access-control-allow-origin'?: string | undefined;
|
|
124
|
+
'access-control-expose-headers'?: string | undefined;
|
|
125
|
+
'access-control-max-age'?: string | undefined;
|
|
126
|
+
'access-control-request-headers'?: string | undefined;
|
|
127
|
+
'access-control-request-method'?: string | undefined;
|
|
128
|
+
age?: string | undefined;
|
|
129
|
+
allow?: string | undefined;
|
|
130
|
+
authorization?: string | undefined;
|
|
131
|
+
'cache-control'?: string | undefined;
|
|
132
|
+
'cdn-cache-control'?: string | undefined;
|
|
133
|
+
connection?: string | string[] | undefined;
|
|
134
|
+
'content-disposition'?: string | undefined;
|
|
135
|
+
'content-encoding'?: string | undefined;
|
|
136
|
+
'content-language'?: string | undefined;
|
|
137
|
+
'content-length'?: string | number | undefined;
|
|
138
|
+
'content-location'?: string | undefined;
|
|
139
|
+
'content-range'?: string | undefined;
|
|
140
|
+
'content-security-policy'?: string | undefined;
|
|
141
|
+
'content-security-policy-report-only'?: string | undefined;
|
|
142
|
+
cookie?: string | string[] | undefined;
|
|
143
|
+
dav?: string | string[] | undefined;
|
|
144
|
+
dnt?: string | undefined;
|
|
145
|
+
date?: string | undefined;
|
|
146
|
+
etag?: string | undefined;
|
|
147
|
+
expect?: string | undefined;
|
|
148
|
+
expires?: string | undefined;
|
|
149
|
+
forwarded?: string | undefined;
|
|
150
|
+
from?: string | undefined;
|
|
151
|
+
host?: string | undefined;
|
|
152
|
+
'if-match'?: string | undefined;
|
|
153
|
+
'if-modified-since'?: string | undefined;
|
|
154
|
+
'if-none-match'?: string | undefined;
|
|
155
|
+
'if-range'?: string | undefined;
|
|
156
|
+
'if-unmodified-since'?: string | undefined;
|
|
157
|
+
'last-modified'?: string | undefined;
|
|
158
|
+
link?: string | string[] | undefined;
|
|
159
|
+
location?: string | undefined;
|
|
160
|
+
'max-forwards'?: string | undefined;
|
|
161
|
+
origin?: string | undefined;
|
|
162
|
+
prgama?: string | string[] | undefined;
|
|
163
|
+
'proxy-authenticate'?: string | string[] | undefined;
|
|
164
|
+
'proxy-authorization'?: string | undefined;
|
|
165
|
+
'public-key-pins'?: string | undefined;
|
|
166
|
+
'public-key-pins-report-only'?: string | undefined;
|
|
167
|
+
range?: string | undefined;
|
|
168
|
+
referer?: string | undefined;
|
|
169
|
+
'referrer-policy'?: string | undefined;
|
|
170
|
+
refresh?: string | undefined;
|
|
171
|
+
'retry-after'?: string | undefined;
|
|
172
|
+
'sec-websocket-accept'?: string | undefined;
|
|
173
|
+
'sec-websocket-extensions'?: string | string[] | undefined;
|
|
174
|
+
'sec-websocket-key'?: string | undefined;
|
|
175
|
+
'sec-websocket-protocol'?: string | string[] | undefined;
|
|
176
|
+
'sec-websocket-version'?: string | undefined;
|
|
177
|
+
server?: string | undefined;
|
|
178
|
+
'set-cookie'?: string | string[] | undefined;
|
|
179
|
+
'strict-transport-security'?: string | undefined;
|
|
180
|
+
te?: string | undefined;
|
|
181
|
+
trailer?: string | undefined;
|
|
182
|
+
'transfer-encoding'?: string | undefined;
|
|
183
|
+
'user-agent'?: string | undefined;
|
|
184
|
+
upgrade?: string | undefined;
|
|
185
|
+
'upgrade-insecure-requests'?: string | undefined;
|
|
186
|
+
vary?: string | undefined;
|
|
187
|
+
via?: string | string[] | undefined;
|
|
188
|
+
warning?: string | undefined;
|
|
189
|
+
'www-authenticate'?: string | string[] | undefined;
|
|
190
|
+
'x-content-type-options'?: string | undefined;
|
|
191
|
+
'x-dns-prefetch-control'?: string | undefined;
|
|
192
|
+
'x-frame-options'?: string | undefined;
|
|
193
|
+
'x-xss-protection'?: string | undefined;
|
|
194
|
+
}
|
|
115
195
|
interface ClientRequestArgs {
|
|
116
196
|
signal?: AbortSignal | undefined;
|
|
117
197
|
protocol?: string | null | undefined;
|