@types/node 14.17.3 → 14.17.7
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.17/README.md +1 -1
- node v14.17/assert.d.ts +3 -3
- node v14.17/async_hooks.d.ts +2 -2
- node v14.17/child_process.d.ts +51 -51
- node v14.17/cluster.d.ts +10 -10
- node v14.17/console.d.ts +4 -4
- node v14.17/crypto.d.ts +32 -32
- node v14.17/dgram.d.ts +9 -9
- node v14.17/dns.d.ts +6 -6
- node v14.17/events.d.ts +1 -1
- node v14.17/fs/promises.d.ts +25 -17
- node v14.17/fs.d.ts +80 -68
- node v14.17/globals.d.ts +19 -19
- node v14.17/http.d.ts +97 -96
- node v14.17/http2.d.ts +64 -64
- node v14.17/https.d.ts +4 -4
- node v14.17/inspector.d.ts +149 -149
- node v14.17/net.d.ts +32 -26
- node v14.17/package.json +2 -2
- node v14.17/path.d.ts +5 -5
- node v14.17/perf_hooks.d.ts +4 -4
- node v14.17/process.d.ts +9 -9
- node v14.17/querystring.d.ts +3 -3
- node v14.17/readline.d.ts +14 -14
- node v14.17/repl.d.ts +14 -14
- node v14.17/stream.d.ts +20 -20
- node v14.17/tls.d.ts +50 -50
- node v14.17/url.d.ts +15 -15
- node v14.17/util.d.ts +2 -2
- node v14.17/vm.d.ts +24 -24
- node v14.17/wasi.d.ts +7 -7
- node v14.17/worker_threads.d.ts +15 -15
- node v14.17/zlib.d.ts +16 -16
node v14.17/globals.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ interface ErrorConstructor {
|
|
|
8
8
|
*
|
|
9
9
|
* @see https://v8.dev/docs/stack-trace-api#customizing-stack-traces
|
|
10
10
|
*/
|
|
11
|
-
prepareStackTrace?: (err: Error, stackTraces: NodeJS.CallSite[]) => any;
|
|
11
|
+
prepareStackTrace?: ((err: Error, stackTraces: NodeJS.CallSite[]) => any) | undefined;
|
|
12
12
|
|
|
13
13
|
stackTraceLimit: number;
|
|
14
14
|
}
|
|
@@ -326,24 +326,24 @@ declare namespace NodeJS {
|
|
|
326
326
|
* the getter function.
|
|
327
327
|
* @default `false`
|
|
328
328
|
*/
|
|
329
|
-
getters?: 'get' | 'set' | boolean;
|
|
330
|
-
showHidden?: boolean;
|
|
329
|
+
getters?: 'get' | 'set' | boolean | undefined;
|
|
330
|
+
showHidden?: boolean | undefined;
|
|
331
331
|
/**
|
|
332
332
|
* @default 2
|
|
333
333
|
*/
|
|
334
|
-
depth?: number | null;
|
|
335
|
-
colors?: boolean;
|
|
336
|
-
customInspect?: boolean;
|
|
337
|
-
showProxy?: boolean;
|
|
338
|
-
maxArrayLength?: number | null;
|
|
334
|
+
depth?: number | null | undefined;
|
|
335
|
+
colors?: boolean | undefined;
|
|
336
|
+
customInspect?: boolean | undefined;
|
|
337
|
+
showProxy?: boolean | undefined;
|
|
338
|
+
maxArrayLength?: number | null | undefined;
|
|
339
339
|
/**
|
|
340
340
|
* Specifies the maximum number of characters to
|
|
341
341
|
* include when formatting. Set to `null` or `Infinity` to show all elements.
|
|
342
342
|
* Set to `0` or negative to show no characters.
|
|
343
343
|
* @default Infinity
|
|
344
344
|
*/
|
|
345
|
-
maxStringLength?: number | null;
|
|
346
|
-
breakLength?: number;
|
|
345
|
+
maxStringLength?: number | null | undefined;
|
|
346
|
+
breakLength?: number | undefined;
|
|
347
347
|
/**
|
|
348
348
|
* Setting this to `false` causes each object key
|
|
349
349
|
* to be displayed on a new line. It will also add new lines to text that is
|
|
@@ -354,8 +354,8 @@ declare namespace NodeJS {
|
|
|
354
354
|
* For more information, see the example below.
|
|
355
355
|
* @default `true`
|
|
356
356
|
*/
|
|
357
|
-
compact?: boolean | number;
|
|
358
|
-
sorted?: boolean | ((a: string, b: string) => number);
|
|
357
|
+
compact?: boolean | number | undefined;
|
|
358
|
+
sorted?: boolean | ((a: string, b: string) => number) | undefined;
|
|
359
359
|
}
|
|
360
360
|
|
|
361
361
|
interface CallSite {
|
|
@@ -433,11 +433,11 @@ declare namespace NodeJS {
|
|
|
433
433
|
}
|
|
434
434
|
|
|
435
435
|
interface ErrnoException extends Error {
|
|
436
|
-
errno?: number;
|
|
437
|
-
code?: string;
|
|
438
|
-
path?: string;
|
|
439
|
-
syscall?: string;
|
|
440
|
-
stack?: string;
|
|
436
|
+
errno?: number | undefined;
|
|
437
|
+
code?: string | undefined;
|
|
438
|
+
path?: string | undefined;
|
|
439
|
+
syscall?: string | undefined;
|
|
440
|
+
stack?: string | undefined;
|
|
441
441
|
}
|
|
442
442
|
|
|
443
443
|
interface ReadableStream extends EventEmitter {
|
|
@@ -447,7 +447,7 @@ declare namespace NodeJS {
|
|
|
447
447
|
pause(): this;
|
|
448
448
|
resume(): this;
|
|
449
449
|
isPaused(): boolean;
|
|
450
|
-
pipe<T extends WritableStream>(destination: T, options?: { end?: boolean; }): T;
|
|
450
|
+
pipe<T extends WritableStream>(destination: T, options?: { end?: boolean | undefined; }): T;
|
|
451
451
|
unpipe(destination?: WritableStream): this;
|
|
452
452
|
unshift(chunk: string | Uint8Array, encoding?: BufferEncoding): void;
|
|
453
453
|
wrap(oldStream: ReadableStream): this;
|
|
@@ -577,7 +577,7 @@ declare namespace NodeJS {
|
|
|
577
577
|
}
|
|
578
578
|
|
|
579
579
|
interface RequireResolve {
|
|
580
|
-
(id: string, options?: { paths?: string[]; }): string;
|
|
580
|
+
(id: string, options?: { paths?: string[] | undefined; }): string;
|
|
581
581
|
paths(request: string): string[] | null;
|
|
582
582
|
}
|
|
583
583
|
|
node v14.17/http.d.ts
CHANGED
|
@@ -5,68 +5,69 @@ declare module 'http' {
|
|
|
5
5
|
|
|
6
6
|
// incoming headers will never contain number
|
|
7
7
|
interface IncomingHttpHeaders extends NodeJS.Dict<string | string[]> {
|
|
8
|
-
'accept'?: string;
|
|
9
|
-
'accept-language'?: string;
|
|
10
|
-
'accept-patch'?: string;
|
|
11
|
-
'accept-ranges'?: string;
|
|
12
|
-
'access-control-allow-credentials'?: string;
|
|
13
|
-
'access-control-allow-headers'?: string;
|
|
14
|
-
'access-control-allow-methods'?: string;
|
|
15
|
-
'access-control-allow-origin'?: string;
|
|
16
|
-
'access-control-expose-headers'?: string;
|
|
17
|
-
'access-control-max-age'?: string;
|
|
18
|
-
'access-control-request-headers'?: string;
|
|
19
|
-
'access-control-request-method'?: string;
|
|
20
|
-
'age'?: string;
|
|
21
|
-
'allow'?: string;
|
|
22
|
-
'alt-svc'?: string;
|
|
23
|
-
'authorization'?: string;
|
|
24
|
-
'cache-control'?: string;
|
|
25
|
-
'connection'?: string;
|
|
26
|
-
'content-disposition'?: string;
|
|
27
|
-
'content-encoding'?: string;
|
|
28
|
-
'content-language'?: string;
|
|
29
|
-
'content-length'?: string;
|
|
30
|
-
'content-location'?: string;
|
|
31
|
-
'content-range'?: string;
|
|
32
|
-
'content-type'?: string;
|
|
33
|
-
'cookie'?: string;
|
|
34
|
-
'date'?: string;
|
|
35
|
-
'
|
|
36
|
-
'
|
|
37
|
-
'
|
|
38
|
-
'
|
|
39
|
-
'
|
|
40
|
-
'
|
|
41
|
-
'if-
|
|
42
|
-
'if-
|
|
43
|
-
'if-
|
|
44
|
-
'
|
|
45
|
-
'
|
|
46
|
-
'
|
|
47
|
-
'
|
|
48
|
-
'
|
|
49
|
-
'proxy-
|
|
50
|
-
'
|
|
51
|
-
'
|
|
52
|
-
'
|
|
53
|
-
'
|
|
54
|
-
'
|
|
55
|
-
'sec-websocket-
|
|
56
|
-
'sec-websocket-
|
|
57
|
-
'sec-websocket-
|
|
58
|
-
'sec-websocket-
|
|
59
|
-
'
|
|
60
|
-
'
|
|
61
|
-
'
|
|
62
|
-
'
|
|
63
|
-
'
|
|
64
|
-
'
|
|
65
|
-
'
|
|
66
|
-
'
|
|
67
|
-
'
|
|
68
|
-
'
|
|
69
|
-
'
|
|
8
|
+
'accept'?: string | undefined;
|
|
9
|
+
'accept-language'?: string | undefined;
|
|
10
|
+
'accept-patch'?: string | undefined;
|
|
11
|
+
'accept-ranges'?: string | undefined;
|
|
12
|
+
'access-control-allow-credentials'?: string | undefined;
|
|
13
|
+
'access-control-allow-headers'?: string | undefined;
|
|
14
|
+
'access-control-allow-methods'?: string | undefined;
|
|
15
|
+
'access-control-allow-origin'?: string | undefined;
|
|
16
|
+
'access-control-expose-headers'?: string | undefined;
|
|
17
|
+
'access-control-max-age'?: string | undefined;
|
|
18
|
+
'access-control-request-headers'?: string | undefined;
|
|
19
|
+
'access-control-request-method'?: string | undefined;
|
|
20
|
+
'age'?: string | undefined;
|
|
21
|
+
'allow'?: string | undefined;
|
|
22
|
+
'alt-svc'?: string | undefined;
|
|
23
|
+
'authorization'?: string | undefined;
|
|
24
|
+
'cache-control'?: string | undefined;
|
|
25
|
+
'connection'?: string | undefined;
|
|
26
|
+
'content-disposition'?: string | undefined;
|
|
27
|
+
'content-encoding'?: string | undefined;
|
|
28
|
+
'content-language'?: string | undefined;
|
|
29
|
+
'content-length'?: string | undefined;
|
|
30
|
+
'content-location'?: string | undefined;
|
|
31
|
+
'content-range'?: string | undefined;
|
|
32
|
+
'content-type'?: string | undefined;
|
|
33
|
+
'cookie'?: string | undefined;
|
|
34
|
+
'date'?: string | undefined;
|
|
35
|
+
'etag'?: string | undefined;
|
|
36
|
+
'expect'?: string | undefined;
|
|
37
|
+
'expires'?: string | undefined;
|
|
38
|
+
'forwarded'?: string | undefined;
|
|
39
|
+
'from'?: string | undefined;
|
|
40
|
+
'host'?: string | undefined;
|
|
41
|
+
'if-match'?: string | undefined;
|
|
42
|
+
'if-modified-since'?: string | undefined;
|
|
43
|
+
'if-none-match'?: string | undefined;
|
|
44
|
+
'if-unmodified-since'?: string | undefined;
|
|
45
|
+
'last-modified'?: string | undefined;
|
|
46
|
+
'location'?: string | undefined;
|
|
47
|
+
'origin'?: string | undefined;
|
|
48
|
+
'pragma'?: string | undefined;
|
|
49
|
+
'proxy-authenticate'?: string | undefined;
|
|
50
|
+
'proxy-authorization'?: string | undefined;
|
|
51
|
+
'public-key-pins'?: string | undefined;
|
|
52
|
+
'range'?: string | undefined;
|
|
53
|
+
'referer'?: string | undefined;
|
|
54
|
+
'retry-after'?: string | undefined;
|
|
55
|
+
'sec-websocket-accept'?: string | undefined;
|
|
56
|
+
'sec-websocket-extensions'?: string | undefined;
|
|
57
|
+
'sec-websocket-key'?: string | undefined;
|
|
58
|
+
'sec-websocket-protocol'?: string | undefined;
|
|
59
|
+
'sec-websocket-version'?: string | undefined;
|
|
60
|
+
'set-cookie'?: string[] | undefined;
|
|
61
|
+
'strict-transport-security'?: string | undefined;
|
|
62
|
+
'tk'?: string | undefined;
|
|
63
|
+
'trailer'?: string | undefined;
|
|
64
|
+
'transfer-encoding'?: string | undefined;
|
|
65
|
+
'upgrade'?: string | undefined;
|
|
66
|
+
'user-agent'?: string | undefined;
|
|
67
|
+
'vary'?: string | undefined;
|
|
68
|
+
'via'?: string | undefined;
|
|
69
|
+
'warning'?: string | undefined;
|
|
70
|
+
'www-authenticate'?: string | undefined;
|
|
70
71
|
}
|
|
71
72
|
|
|
72
73
|
// outgoing headers allows numbers (as they are converted internally to strings)
|
|
@@ -76,47 +77,47 @@ declare module 'http' {
|
|
|
76
77
|
}
|
|
77
78
|
|
|
78
79
|
interface ClientRequestArgs {
|
|
79
|
-
protocol?: string | null;
|
|
80
|
-
host?: string | null;
|
|
81
|
-
hostname?: string | null;
|
|
82
|
-
family?: number;
|
|
83
|
-
port?: number | string | null;
|
|
84
|
-
defaultPort?: number | string;
|
|
85
|
-
localAddress?: string;
|
|
86
|
-
socketPath?: string;
|
|
80
|
+
protocol?: string | null | undefined;
|
|
81
|
+
host?: string | null | undefined;
|
|
82
|
+
hostname?: string | null | undefined;
|
|
83
|
+
family?: number | undefined;
|
|
84
|
+
port?: number | string | null | undefined;
|
|
85
|
+
defaultPort?: number | string | undefined;
|
|
86
|
+
localAddress?: string | undefined;
|
|
87
|
+
socketPath?: string | undefined;
|
|
87
88
|
/**
|
|
88
89
|
* @default 8192
|
|
89
90
|
*/
|
|
90
|
-
maxHeaderSize?: number;
|
|
91
|
-
method?: string;
|
|
92
|
-
path?: string | null;
|
|
93
|
-
headers?: OutgoingHttpHeaders;
|
|
94
|
-
auth?: string | null;
|
|
95
|
-
agent?: Agent | boolean;
|
|
96
|
-
_defaultAgent?: Agent;
|
|
97
|
-
timeout?: number;
|
|
98
|
-
setHost?: boolean;
|
|
91
|
+
maxHeaderSize?: number | undefined;
|
|
92
|
+
method?: string | undefined;
|
|
93
|
+
path?: string | null | undefined;
|
|
94
|
+
headers?: OutgoingHttpHeaders | undefined;
|
|
95
|
+
auth?: string | null | undefined;
|
|
96
|
+
agent?: Agent | boolean | undefined;
|
|
97
|
+
_defaultAgent?: Agent | undefined;
|
|
98
|
+
timeout?: number | undefined;
|
|
99
|
+
setHost?: boolean | undefined;
|
|
99
100
|
// https://github.com/nodejs/node/blob/master/lib/_http_client.js#L278
|
|
100
|
-
createConnection?: (options: ClientRequestArgs, oncreate: (err: Error, socket: Socket) => void) => Socket;
|
|
101
|
+
createConnection?: ((options: ClientRequestArgs, oncreate: (err: Error, socket: Socket) => void) => Socket) | undefined;
|
|
101
102
|
}
|
|
102
103
|
|
|
103
104
|
interface ServerOptions {
|
|
104
|
-
IncomingMessage?: typeof IncomingMessage;
|
|
105
|
-
ServerResponse?: typeof ServerResponse;
|
|
105
|
+
IncomingMessage?: typeof IncomingMessage | undefined;
|
|
106
|
+
ServerResponse?: typeof ServerResponse | undefined;
|
|
106
107
|
/**
|
|
107
108
|
* Optionally overrides the value of
|
|
108
109
|
* [`--max-http-header-size`][] for requests received by this server, i.e.
|
|
109
110
|
* the maximum length of request headers in bytes.
|
|
110
111
|
* @default 8192
|
|
111
112
|
*/
|
|
112
|
-
maxHeaderSize?: number;
|
|
113
|
+
maxHeaderSize?: number | undefined;
|
|
113
114
|
/**
|
|
114
115
|
* Use an insecure HTTP parser that accepts invalid HTTP headers when true.
|
|
115
116
|
* Using the insecure parser should be avoided.
|
|
116
117
|
* See --insecure-http-parser for more information.
|
|
117
118
|
* @default false
|
|
118
119
|
*/
|
|
119
|
-
insecureHTTPParser?: boolean;
|
|
120
|
+
insecureHTTPParser?: boolean | undefined;
|
|
120
121
|
}
|
|
121
122
|
|
|
122
123
|
type RequestListener = (req: IncomingMessage, res: ServerResponse) => void;
|
|
@@ -195,7 +196,7 @@ declare module 'http' {
|
|
|
195
196
|
// https://github.com/nodejs/node/blob/master/test/parallel/test-http-write-callbacks.js#L53
|
|
196
197
|
// no args in writeContinue callback
|
|
197
198
|
writeContinue(callback?: () => void): void;
|
|
198
|
-
writeHead(statusCode: number,
|
|
199
|
+
writeHead(statusCode: number, statusMessage?: string, headers?: OutgoingHttpHeaders | OutgoingHttpHeader[]): this;
|
|
199
200
|
writeHead(statusCode: number, headers?: OutgoingHttpHeaders | OutgoingHttpHeader[]): this;
|
|
200
201
|
writeProcessing(): void;
|
|
201
202
|
}
|
|
@@ -329,19 +330,19 @@ declare module 'http' {
|
|
|
329
330
|
/**
|
|
330
331
|
* Only valid for request obtained from http.Server.
|
|
331
332
|
*/
|
|
332
|
-
method?: string;
|
|
333
|
+
method?: string | undefined;
|
|
333
334
|
/**
|
|
334
335
|
* Only valid for request obtained from http.Server.
|
|
335
336
|
*/
|
|
336
|
-
url?: string;
|
|
337
|
+
url?: string | undefined;
|
|
337
338
|
/**
|
|
338
339
|
* Only valid for response obtained from http.ClientRequest.
|
|
339
340
|
*/
|
|
340
|
-
statusCode?: number;
|
|
341
|
+
statusCode?: number | undefined;
|
|
341
342
|
/**
|
|
342
343
|
* Only valid for response obtained from http.ClientRequest.
|
|
343
344
|
*/
|
|
344
|
-
statusMessage?: string;
|
|
345
|
+
statusMessage?: string | undefined;
|
|
345
346
|
destroy(error?: Error): void;
|
|
346
347
|
}
|
|
347
348
|
|
|
@@ -349,32 +350,32 @@ declare module 'http' {
|
|
|
349
350
|
/**
|
|
350
351
|
* Keep sockets around in a pool to be used by other requests in the future. Default = false
|
|
351
352
|
*/
|
|
352
|
-
keepAlive?: boolean;
|
|
353
|
+
keepAlive?: boolean | undefined;
|
|
353
354
|
/**
|
|
354
355
|
* When using HTTP KeepAlive, how often to send TCP KeepAlive packets over sockets being kept alive. Default = 1000.
|
|
355
356
|
* Only relevant if keepAlive is set to true.
|
|
356
357
|
*/
|
|
357
|
-
keepAliveMsecs?: number;
|
|
358
|
+
keepAliveMsecs?: number | undefined;
|
|
358
359
|
/**
|
|
359
360
|
* Maximum number of sockets to allow per host. Default for Node 0.10 is 5, default for Node 0.12 is Infinity
|
|
360
361
|
*/
|
|
361
|
-
maxSockets?: number;
|
|
362
|
+
maxSockets?: number | undefined;
|
|
362
363
|
/**
|
|
363
364
|
* Maximum number of sockets allowed for all hosts in total. Each request will use a new socket until the maximum is reached. Default: Infinity.
|
|
364
365
|
*/
|
|
365
|
-
maxTotalSockets?: number;
|
|
366
|
+
maxTotalSockets?: number | undefined;
|
|
366
367
|
/**
|
|
367
368
|
* Maximum number of sockets to leave open in a free state. Only relevant if keepAlive is set to true. Default = 256.
|
|
368
369
|
*/
|
|
369
|
-
maxFreeSockets?: number;
|
|
370
|
+
maxFreeSockets?: number | undefined;
|
|
370
371
|
/**
|
|
371
372
|
* Socket timeout in milliseconds. This will set the timeout after the socket is connected.
|
|
372
373
|
*/
|
|
373
|
-
timeout?: number;
|
|
374
|
+
timeout?: number | undefined;
|
|
374
375
|
/**
|
|
375
376
|
* Scheduling strategy to apply when picking the next free socket to use. Default: 'fifo'.
|
|
376
377
|
*/
|
|
377
|
-
scheduling?: 'fifo' | 'lifo';
|
|
378
|
+
scheduling?: 'fifo' | 'lifo' | undefined;
|
|
378
379
|
}
|
|
379
380
|
|
|
380
381
|
class Agent {
|
node v14.17/http2.d.ts
CHANGED
|
@@ -15,37 +15,37 @@ declare module 'http2' {
|
|
|
15
15
|
export { OutgoingHttpHeaders } from 'http';
|
|
16
16
|
|
|
17
17
|
export interface IncomingHttpStatusHeader {
|
|
18
|
-
":status"?: number;
|
|
18
|
+
":status"?: number | undefined;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
export interface IncomingHttpHeaders extends Http1IncomingHttpHeaders {
|
|
22
|
-
":path"?: string;
|
|
23
|
-
":method"?: string;
|
|
24
|
-
":authority"?: string;
|
|
25
|
-
":scheme"?: string;
|
|
22
|
+
":path"?: string | undefined;
|
|
23
|
+
":method"?: string | undefined;
|
|
24
|
+
":authority"?: string | undefined;
|
|
25
|
+
":scheme"?: string | undefined;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
// Http2Stream
|
|
29
29
|
|
|
30
30
|
export interface StreamPriorityOptions {
|
|
31
|
-
exclusive?: boolean;
|
|
32
|
-
parent?: number;
|
|
33
|
-
weight?: number;
|
|
34
|
-
silent?: boolean;
|
|
31
|
+
exclusive?: boolean | undefined;
|
|
32
|
+
parent?: number | undefined;
|
|
33
|
+
weight?: number | undefined;
|
|
34
|
+
silent?: boolean | undefined;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
export interface StreamState {
|
|
38
|
-
localWindowSize?: number;
|
|
39
|
-
state?: number;
|
|
40
|
-
localClose?: number;
|
|
41
|
-
remoteClose?: number;
|
|
42
|
-
sumDependencyWeight?: number;
|
|
43
|
-
weight?: number;
|
|
38
|
+
localWindowSize?: number | undefined;
|
|
39
|
+
state?: number | undefined;
|
|
40
|
+
localClose?: number | undefined;
|
|
41
|
+
remoteClose?: number | undefined;
|
|
42
|
+
sumDependencyWeight?: number | undefined;
|
|
43
|
+
weight?: number | undefined;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
export interface ServerStreamResponseOptions {
|
|
47
|
-
endStream?: boolean;
|
|
48
|
-
waitForTrailers?: boolean;
|
|
47
|
+
endStream?: boolean | undefined;
|
|
48
|
+
waitForTrailers?: boolean | undefined;
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
export interface StatOptions {
|
|
@@ -55,9 +55,9 @@ declare module 'http2' {
|
|
|
55
55
|
|
|
56
56
|
export interface ServerStreamFileResponseOptions {
|
|
57
57
|
statCheck?(stats: fs.Stats, headers: OutgoingHttpHeaders, statOptions: StatOptions): void | boolean;
|
|
58
|
-
waitForTrailers?: boolean;
|
|
59
|
-
offset?: number;
|
|
60
|
-
length?: number;
|
|
58
|
+
waitForTrailers?: boolean | undefined;
|
|
59
|
+
offset?: number | undefined;
|
|
60
|
+
length?: number | undefined;
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
export interface ServerStreamFileResponseOptionsWithError extends ServerStreamFileResponseOptions {
|
|
@@ -74,12 +74,12 @@ declare module 'http2' {
|
|
|
74
74
|
* indicating that no additional data should be received and the readable side of the Http2Stream will be closed.
|
|
75
75
|
*/
|
|
76
76
|
readonly endAfterHeaders: boolean;
|
|
77
|
-
readonly id?: number;
|
|
77
|
+
readonly id?: number | undefined;
|
|
78
78
|
readonly pending: boolean;
|
|
79
79
|
readonly rstCode: number;
|
|
80
80
|
readonly sentHeaders: OutgoingHttpHeaders;
|
|
81
|
-
readonly sentInfoHeaders?: OutgoingHttpHeaders[];
|
|
82
|
-
readonly sentTrailers?: OutgoingHttpHeaders;
|
|
81
|
+
readonly sentInfoHeaders?: OutgoingHttpHeaders[] | undefined;
|
|
82
|
+
readonly sentTrailers?: OutgoingHttpHeaders | undefined;
|
|
83
83
|
readonly session: Http2Session;
|
|
84
84
|
readonly state: StreamState;
|
|
85
85
|
|
|
@@ -237,43 +237,43 @@ declare module 'http2' {
|
|
|
237
237
|
// Http2Session
|
|
238
238
|
|
|
239
239
|
export interface Settings {
|
|
240
|
-
headerTableSize?: number;
|
|
241
|
-
enablePush?: boolean;
|
|
242
|
-
initialWindowSize?: number;
|
|
243
|
-
maxFrameSize?: number;
|
|
244
|
-
maxConcurrentStreams?: number;
|
|
245
|
-
maxHeaderListSize?: number;
|
|
246
|
-
enableConnectProtocol?: boolean;
|
|
240
|
+
headerTableSize?: number | undefined;
|
|
241
|
+
enablePush?: boolean | undefined;
|
|
242
|
+
initialWindowSize?: number | undefined;
|
|
243
|
+
maxFrameSize?: number | undefined;
|
|
244
|
+
maxConcurrentStreams?: number | undefined;
|
|
245
|
+
maxHeaderListSize?: number | undefined;
|
|
246
|
+
enableConnectProtocol?: boolean | undefined;
|
|
247
247
|
}
|
|
248
248
|
|
|
249
249
|
export interface ClientSessionRequestOptions {
|
|
250
|
-
endStream?: boolean;
|
|
251
|
-
exclusive?: boolean;
|
|
252
|
-
parent?: number;
|
|
253
|
-
weight?: number;
|
|
254
|
-
waitForTrailers?: boolean;
|
|
250
|
+
endStream?: boolean | undefined;
|
|
251
|
+
exclusive?: boolean | undefined;
|
|
252
|
+
parent?: number | undefined;
|
|
253
|
+
weight?: number | undefined;
|
|
254
|
+
waitForTrailers?: boolean | undefined;
|
|
255
255
|
}
|
|
256
256
|
|
|
257
257
|
export interface SessionState {
|
|
258
|
-
effectiveLocalWindowSize?: number;
|
|
259
|
-
effectiveRecvDataLength?: number;
|
|
260
|
-
nextStreamID?: number;
|
|
261
|
-
localWindowSize?: number;
|
|
262
|
-
lastProcStreamID?: number;
|
|
263
|
-
remoteWindowSize?: number;
|
|
264
|
-
outboundQueueSize?: number;
|
|
265
|
-
deflateDynamicTableSize?: number;
|
|
266
|
-
inflateDynamicTableSize?: number;
|
|
258
|
+
effectiveLocalWindowSize?: number | undefined;
|
|
259
|
+
effectiveRecvDataLength?: number | undefined;
|
|
260
|
+
nextStreamID?: number | undefined;
|
|
261
|
+
localWindowSize?: number | undefined;
|
|
262
|
+
lastProcStreamID?: number | undefined;
|
|
263
|
+
remoteWindowSize?: number | undefined;
|
|
264
|
+
outboundQueueSize?: number | undefined;
|
|
265
|
+
deflateDynamicTableSize?: number | undefined;
|
|
266
|
+
inflateDynamicTableSize?: number | undefined;
|
|
267
267
|
}
|
|
268
268
|
|
|
269
269
|
export interface Http2Session extends EventEmitter {
|
|
270
|
-
readonly alpnProtocol?: string;
|
|
270
|
+
readonly alpnProtocol?: string | undefined;
|
|
271
271
|
readonly closed: boolean;
|
|
272
272
|
readonly connecting: boolean;
|
|
273
273
|
readonly destroyed: boolean;
|
|
274
|
-
readonly encrypted?: boolean;
|
|
274
|
+
readonly encrypted?: boolean | undefined;
|
|
275
275
|
readonly localSettings: Settings;
|
|
276
|
-
readonly originSet?: string[];
|
|
276
|
+
readonly originSet?: string[] | undefined;
|
|
277
277
|
readonly pendingSettingsAck: boolean;
|
|
278
278
|
readonly remoteSettings: Settings;
|
|
279
279
|
readonly socket: net.Socket | tls.TLSSocket;
|
|
@@ -430,30 +430,30 @@ declare module 'http2' {
|
|
|
430
430
|
// Http2Server
|
|
431
431
|
|
|
432
432
|
export interface SessionOptions {
|
|
433
|
-
maxDeflateDynamicTableSize?: number;
|
|
434
|
-
maxSessionMemory?: number;
|
|
435
|
-
maxHeaderListPairs?: number;
|
|
436
|
-
maxOutstandingPings?: number;
|
|
437
|
-
maxSendHeaderBlockLength?: number;
|
|
438
|
-
paddingStrategy?: number;
|
|
439
|
-
peerMaxConcurrentStreams?: number;
|
|
440
|
-
settings?: Settings;
|
|
433
|
+
maxDeflateDynamicTableSize?: number | undefined;
|
|
434
|
+
maxSessionMemory?: number | undefined;
|
|
435
|
+
maxHeaderListPairs?: number | undefined;
|
|
436
|
+
maxOutstandingPings?: number | undefined;
|
|
437
|
+
maxSendHeaderBlockLength?: number | undefined;
|
|
438
|
+
paddingStrategy?: number | undefined;
|
|
439
|
+
peerMaxConcurrentStreams?: number | undefined;
|
|
440
|
+
settings?: Settings | undefined;
|
|
441
441
|
|
|
442
442
|
selectPadding?(frameLen: number, maxFrameLen: number): number;
|
|
443
443
|
createConnection?(authority: url.URL, option: SessionOptions): stream.Duplex;
|
|
444
444
|
}
|
|
445
445
|
|
|
446
446
|
export interface ClientSessionOptions extends SessionOptions {
|
|
447
|
-
maxReservedRemoteStreams?: number;
|
|
448
|
-
createConnection?: (authority: url.URL, option: SessionOptions) => stream.Duplex;
|
|
449
|
-
protocol?: 'http:' | 'https:';
|
|
447
|
+
maxReservedRemoteStreams?: number | undefined;
|
|
448
|
+
createConnection?: ((authority: url.URL, option: SessionOptions) => stream.Duplex) | undefined;
|
|
449
|
+
protocol?: 'http:' | 'https:' | undefined;
|
|
450
450
|
}
|
|
451
451
|
|
|
452
452
|
export interface ServerSessionOptions extends SessionOptions {
|
|
453
|
-
Http1IncomingMessage?: typeof IncomingMessage;
|
|
454
|
-
Http1ServerResponse?: typeof ServerResponse;
|
|
455
|
-
Http2ServerRequest?: typeof Http2ServerRequest;
|
|
456
|
-
Http2ServerResponse?: typeof Http2ServerResponse;
|
|
453
|
+
Http1IncomingMessage?: typeof IncomingMessage | undefined;
|
|
454
|
+
Http1ServerResponse?: typeof ServerResponse | undefined;
|
|
455
|
+
Http2ServerRequest?: typeof Http2ServerRequest | undefined;
|
|
456
|
+
Http2ServerResponse?: typeof Http2ServerResponse | undefined;
|
|
457
457
|
}
|
|
458
458
|
|
|
459
459
|
export interface SecureClientSessionOptions extends ClientSessionOptions, tls.ConnectionOptions { }
|
|
@@ -462,8 +462,8 @@ declare module 'http2' {
|
|
|
462
462
|
export interface ServerOptions extends ServerSessionOptions { }
|
|
463
463
|
|
|
464
464
|
export interface SecureServerOptions extends SecureServerSessionOptions {
|
|
465
|
-
allowHTTP1?: boolean;
|
|
466
|
-
origins?: string[];
|
|
465
|
+
allowHTTP1?: boolean | undefined;
|
|
466
|
+
origins?: string[] | undefined;
|
|
467
467
|
}
|
|
468
468
|
|
|
469
469
|
export interface Http2Server extends net.Server {
|
node v14.17/https.d.ts
CHANGED
|
@@ -6,13 +6,13 @@ declare module 'https' {
|
|
|
6
6
|
type ServerOptions = tls.SecureContextOptions & tls.TlsOptions & http.ServerOptions;
|
|
7
7
|
|
|
8
8
|
type RequestOptions = http.RequestOptions & tls.SecureContextOptions & {
|
|
9
|
-
rejectUnauthorized?: boolean; // Defaults to true
|
|
10
|
-
servername?: string; // SNI TLS Extension
|
|
9
|
+
rejectUnauthorized?: boolean | undefined; // Defaults to true
|
|
10
|
+
servername?: string | undefined; // SNI TLS Extension
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
interface AgentOptions extends http.AgentOptions, tls.ConnectionOptions {
|
|
14
|
-
rejectUnauthorized?: boolean;
|
|
15
|
-
maxCachedSessions?: number;
|
|
14
|
+
rejectUnauthorized?: boolean | undefined;
|
|
15
|
+
maxCachedSessions?: number | undefined;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
class Agent extends http.Agent {
|