@types/node 14.17.2 → 14.17.6
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 +13 -13
- 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 +26 -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/net.d.ts
CHANGED
|
@@ -16,10 +16,10 @@ declare module 'net' {
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
interface SocketConstructorOpts {
|
|
19
|
-
fd?: number;
|
|
20
|
-
allowHalfOpen?: boolean;
|
|
21
|
-
readable?: boolean;
|
|
22
|
-
writable?: boolean;
|
|
19
|
+
fd?: number | undefined;
|
|
20
|
+
allowHalfOpen?: boolean | undefined;
|
|
21
|
+
readable?: boolean | undefined;
|
|
22
|
+
writable?: boolean | undefined;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
interface OnReadOpts {
|
|
@@ -38,17 +38,17 @@ declare module 'net' {
|
|
|
38
38
|
* Note: this will cause the streaming functionality to not provide any data, however events like 'error', 'end', and 'close' will
|
|
39
39
|
* still be emitted as normal and methods like pause() and resume() will also behave as expected.
|
|
40
40
|
*/
|
|
41
|
-
onread?: OnReadOpts;
|
|
41
|
+
onread?: OnReadOpts | undefined;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
interface TcpSocketConnectOpts extends ConnectOpts {
|
|
45
45
|
port: number;
|
|
46
|
-
host?: string;
|
|
47
|
-
localAddress?: string;
|
|
48
|
-
localPort?: number;
|
|
49
|
-
hints?: number;
|
|
50
|
-
family?: number;
|
|
51
|
-
lookup?: LookupFunction;
|
|
46
|
+
host?: string | undefined;
|
|
47
|
+
localAddress?: string | undefined;
|
|
48
|
+
localPort?: number | undefined;
|
|
49
|
+
hints?: number | undefined;
|
|
50
|
+
family?: number | undefined;
|
|
51
|
+
lookup?: LookupFunction | undefined;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
interface IpcSocketConnectOpts extends ConnectOpts {
|
|
@@ -87,9 +87,9 @@ declare module 'net' {
|
|
|
87
87
|
readonly destroyed: boolean;
|
|
88
88
|
readonly localAddress: string;
|
|
89
89
|
readonly localPort: number;
|
|
90
|
-
readonly remoteAddress?: string;
|
|
91
|
-
readonly remoteFamily?: string;
|
|
92
|
-
readonly remotePort?: number;
|
|
90
|
+
readonly remoteAddress?: string | undefined;
|
|
91
|
+
readonly remoteFamily?: string | undefined;
|
|
92
|
+
readonly remotePort?: number | undefined;
|
|
93
93
|
|
|
94
94
|
// Extended base methods
|
|
95
95
|
end(cb?: () => void): void;
|
|
@@ -169,17 +169,17 @@ declare module 'net' {
|
|
|
169
169
|
}
|
|
170
170
|
|
|
171
171
|
interface ListenOptions {
|
|
172
|
-
port?: number;
|
|
173
|
-
host?: string;
|
|
174
|
-
backlog?: number;
|
|
175
|
-
path?: string;
|
|
176
|
-
exclusive?: boolean;
|
|
177
|
-
readableAll?: boolean;
|
|
178
|
-
writableAll?: boolean;
|
|
172
|
+
port?: number | undefined;
|
|
173
|
+
host?: string | undefined;
|
|
174
|
+
backlog?: number | undefined;
|
|
175
|
+
path?: string | undefined;
|
|
176
|
+
exclusive?: boolean | undefined;
|
|
177
|
+
readableAll?: boolean | undefined;
|
|
178
|
+
writableAll?: boolean | undefined;
|
|
179
179
|
/**
|
|
180
180
|
* @default false
|
|
181
181
|
*/
|
|
182
|
-
ipv6Only?: boolean;
|
|
182
|
+
ipv6Only?: boolean | undefined;
|
|
183
183
|
}
|
|
184
184
|
|
|
185
185
|
interface ServerOpts {
|
|
@@ -187,13 +187,13 @@ declare module 'net' {
|
|
|
187
187
|
* Indicates whether half-opened TCP connections are allowed.
|
|
188
188
|
* @default false
|
|
189
189
|
*/
|
|
190
|
-
allowHalfOpen?: boolean;
|
|
190
|
+
allowHalfOpen?: boolean | undefined;
|
|
191
191
|
|
|
192
192
|
/**
|
|
193
193
|
* Indicates whether the socket should be paused on incoming connections.
|
|
194
194
|
* @default false
|
|
195
195
|
*/
|
|
196
|
-
pauseOnConnect?: boolean;
|
|
196
|
+
pauseOnConnect?: boolean | undefined;
|
|
197
197
|
}
|
|
198
198
|
|
|
199
199
|
// https://github.com/nodejs/node/blob/master/lib/net.js
|
|
@@ -264,11 +264,11 @@ declare module 'net' {
|
|
|
264
264
|
}
|
|
265
265
|
|
|
266
266
|
interface TcpNetConnectOpts extends TcpSocketConnectOpts, SocketConstructorOpts {
|
|
267
|
-
timeout?: number;
|
|
267
|
+
timeout?: number | undefined;
|
|
268
268
|
}
|
|
269
269
|
|
|
270
270
|
interface IpcNetConnectOpts extends IpcSocketConnectOpts, SocketConstructorOpts {
|
|
271
|
-
timeout?: number;
|
|
271
|
+
timeout?: number | undefined;
|
|
272
272
|
}
|
|
273
273
|
|
|
274
274
|
type NetConnectOpts = TcpNetConnectOpts | IpcNetConnectOpts;
|
node v14.17/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "14.17.
|
|
3
|
+
"version": "14.17.6",
|
|
4
4
|
"description": "TypeScript definitions for Node.js",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
|
|
6
6
|
"license": "MIT",
|
|
@@ -232,6 +232,6 @@
|
|
|
232
232
|
},
|
|
233
233
|
"scripts": {},
|
|
234
234
|
"dependencies": {},
|
|
235
|
-
"typesPublisherContentHash": "
|
|
235
|
+
"typesPublisherContentHash": "b15faea838f36d71d94beffebbfdb5e348698036a62d69d39fbbd53a822be6c9",
|
|
236
236
|
"typeScriptVersion": "3.6"
|
|
237
237
|
}
|
node v14.17/path.d.ts
CHANGED
|
@@ -30,23 +30,23 @@ declare module 'path' {
|
|
|
30
30
|
/**
|
|
31
31
|
* The root of the path such as '/' or 'c:\'
|
|
32
32
|
*/
|
|
33
|
-
root?: string;
|
|
33
|
+
root?: string | undefined;
|
|
34
34
|
/**
|
|
35
35
|
* The full directory path such as '/home/user/dir' or 'c:\path\dir'
|
|
36
36
|
*/
|
|
37
|
-
dir?: string;
|
|
37
|
+
dir?: string | undefined;
|
|
38
38
|
/**
|
|
39
39
|
* The file name including extension (if any) such as 'index.html'
|
|
40
40
|
*/
|
|
41
|
-
base?: string;
|
|
41
|
+
base?: string | undefined;
|
|
42
42
|
/**
|
|
43
43
|
* The file extension (if any) such as '.html'
|
|
44
44
|
*/
|
|
45
|
-
ext?: string;
|
|
45
|
+
ext?: string | undefined;
|
|
46
46
|
/**
|
|
47
47
|
* The file name without extension (if any) such as 'index'
|
|
48
48
|
*/
|
|
49
|
-
name?: string;
|
|
49
|
+
name?: string | undefined;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
interface PlatformPath {
|
node v14.17/perf_hooks.d.ts
CHANGED
|
@@ -31,14 +31,14 @@ declare module 'perf_hooks' {
|
|
|
31
31
|
* the type of garbage collection operation that occurred.
|
|
32
32
|
* See perf_hooks.constants for valid values.
|
|
33
33
|
*/
|
|
34
|
-
readonly kind?: number;
|
|
34
|
+
readonly kind?: number | undefined;
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
37
|
* When `performanceEntry.entryType` is equal to 'gc', the `performance.flags`
|
|
38
38
|
* property contains additional information about garbage collection operation.
|
|
39
39
|
* See perf_hooks.constants for valid values.
|
|
40
40
|
*/
|
|
41
|
-
readonly flags?: number;
|
|
41
|
+
readonly flags?: number | undefined;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
interface PerformanceNodeTiming extends PerformanceEntry {
|
|
@@ -186,7 +186,7 @@ declare module 'perf_hooks' {
|
|
|
186
186
|
* Property buffered defaults to false.
|
|
187
187
|
* @param options
|
|
188
188
|
*/
|
|
189
|
-
observe(options: { entryTypes: ReadonlyArray<EntryType>; buffered?: boolean }): void;
|
|
189
|
+
observe(options: { entryTypes: ReadonlyArray<EntryType>; buffered?: boolean | undefined }): void;
|
|
190
190
|
}
|
|
191
191
|
|
|
192
192
|
namespace constants {
|
|
@@ -212,7 +212,7 @@ declare module 'perf_hooks' {
|
|
|
212
212
|
* Must be greater than zero.
|
|
213
213
|
* @default 10
|
|
214
214
|
*/
|
|
215
|
-
resolution?: number;
|
|
215
|
+
resolution?: number | undefined;
|
|
216
216
|
}
|
|
217
217
|
|
|
218
218
|
interface EventLoopDelayMonitor {
|
node v14.17/process.d.ts
CHANGED
|
@@ -26,10 +26,10 @@ declare module 'process' {
|
|
|
26
26
|
|
|
27
27
|
interface ProcessRelease {
|
|
28
28
|
name: string;
|
|
29
|
-
sourceUrl?: string;
|
|
30
|
-
headersUrl?: string;
|
|
31
|
-
libUrl?: string;
|
|
32
|
-
lts?: string;
|
|
29
|
+
sourceUrl?: string | undefined;
|
|
30
|
+
headersUrl?: string | undefined;
|
|
31
|
+
libUrl?: string | undefined;
|
|
32
|
+
lts?: string | undefined;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
interface ProcessVersions extends Dict<string> {
|
|
@@ -76,7 +76,7 @@ declare module 'process' {
|
|
|
76
76
|
type MultipleResolveListener = (type: MultipleResolveType, promise: Promise<any>, value: any) => void;
|
|
77
77
|
|
|
78
78
|
interface Socket extends ReadWriteStream {
|
|
79
|
-
isTTY?: true;
|
|
79
|
+
isTTY?: true | undefined;
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
// Alias for compatibility
|
|
@@ -199,7 +199,7 @@ declare module 'process' {
|
|
|
199
199
|
emitWarning(warning: string | Error, name?: string, ctor?: Function): void;
|
|
200
200
|
env: ProcessEnv;
|
|
201
201
|
exit(code?: number): never;
|
|
202
|
-
exitCode?: number;
|
|
202
|
+
exitCode?: number | undefined;
|
|
203
203
|
getgid(): number;
|
|
204
204
|
setgid(id: number | string): void;
|
|
205
205
|
getuid(): number;
|
|
@@ -247,7 +247,7 @@ declare module 'process' {
|
|
|
247
247
|
arch: string;
|
|
248
248
|
platform: Platform;
|
|
249
249
|
/** @deprecated since v14.0.0 - use `require.main` instead. */
|
|
250
|
-
mainModule?: Module;
|
|
250
|
+
mainModule?: Module | undefined;
|
|
251
251
|
memoryUsage(): MemoryUsage;
|
|
252
252
|
cpuUsage(previousValue?: CpuUsage): CpuUsage;
|
|
253
253
|
nextTick(callback: Function, ...args: any[]): void;
|
|
@@ -277,7 +277,7 @@ declare module 'process' {
|
|
|
277
277
|
domain: Domain;
|
|
278
278
|
|
|
279
279
|
// Worker
|
|
280
|
-
send?(message: any, sendHandle?: any, options?: { swallowErrors?: boolean}, callback?: (error: Error | null) => void): boolean;
|
|
280
|
+
send?(message: any, sendHandle?: any, options?: { swallowErrors?: boolean | undefined}, callback?: (error: Error | null) => void): boolean;
|
|
281
281
|
disconnect(): void;
|
|
282
282
|
connected: boolean;
|
|
283
283
|
|
|
@@ -291,7 +291,7 @@ declare module 'process' {
|
|
|
291
291
|
/**
|
|
292
292
|
* Only available with `--experimental-report`
|
|
293
293
|
*/
|
|
294
|
-
report?: ProcessReport;
|
|
294
|
+
report?: ProcessReport | undefined;
|
|
295
295
|
|
|
296
296
|
resourceUsage(): ResourceUsage;
|
|
297
297
|
|
node v14.17/querystring.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
declare module 'querystring' {
|
|
2
2
|
interface StringifyOptions {
|
|
3
|
-
encodeURIComponent?: (str: string) => string;
|
|
3
|
+
encodeURIComponent?: ((str: string) => string) | undefined;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
6
|
interface ParseOptions {
|
|
7
|
-
maxKeys?: number;
|
|
8
|
-
decodeURIComponent?: (str: string) => string;
|
|
7
|
+
maxKeys?: number | undefined;
|
|
8
|
+
decodeURIComponent?: ((str: string) => string) | undefined;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
interface ParsedUrlQuery extends NodeJS.Dict<string | string[]> { }
|
node v14.17/readline.d.ts
CHANGED
|
@@ -2,11 +2,11 @@ declare module 'readline' {
|
|
|
2
2
|
import EventEmitter = require('events');
|
|
3
3
|
|
|
4
4
|
interface Key {
|
|
5
|
-
sequence?: string;
|
|
6
|
-
name?: string;
|
|
7
|
-
ctrl?: boolean;
|
|
8
|
-
meta?: boolean;
|
|
9
|
-
shift?: boolean;
|
|
5
|
+
sequence?: string | undefined;
|
|
6
|
+
name?: string | undefined;
|
|
7
|
+
ctrl?: boolean | undefined;
|
|
8
|
+
meta?: boolean | undefined;
|
|
9
|
+
shift?: boolean | undefined;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
class Interface extends EventEmitter {
|
|
@@ -129,15 +129,15 @@ declare module 'readline' {
|
|
|
129
129
|
|
|
130
130
|
interface ReadLineOptions {
|
|
131
131
|
input: NodeJS.ReadableStream;
|
|
132
|
-
output?: NodeJS.WritableStream;
|
|
133
|
-
completer?: Completer | AsyncCompleter;
|
|
134
|
-
terminal?: boolean;
|
|
135
|
-
historySize?: number;
|
|
136
|
-
prompt?: string;
|
|
137
|
-
crlfDelay?: number;
|
|
138
|
-
removeHistoryDuplicates?: boolean;
|
|
139
|
-
escapeCodeTimeout?: number;
|
|
140
|
-
tabSize?: number;
|
|
132
|
+
output?: NodeJS.WritableStream | undefined;
|
|
133
|
+
completer?: Completer | AsyncCompleter | undefined;
|
|
134
|
+
terminal?: boolean | undefined;
|
|
135
|
+
historySize?: number | undefined;
|
|
136
|
+
prompt?: string | undefined;
|
|
137
|
+
crlfDelay?: number | undefined;
|
|
138
|
+
removeHistoryDuplicates?: boolean | undefined;
|
|
139
|
+
escapeCodeTimeout?: number | undefined;
|
|
140
|
+
tabSize?: number | undefined;
|
|
141
141
|
}
|
|
142
142
|
|
|
143
143
|
function createInterface(input: NodeJS.ReadableStream, output?: NodeJS.WritableStream, completer?: Completer | AsyncCompleter, terminal?: boolean): Interface;
|
node v14.17/repl.d.ts
CHANGED
|
@@ -8,24 +8,24 @@ declare module 'repl' {
|
|
|
8
8
|
* The input prompt to display.
|
|
9
9
|
* @default "> "
|
|
10
10
|
*/
|
|
11
|
-
prompt?: string;
|
|
11
|
+
prompt?: string | undefined;
|
|
12
12
|
/**
|
|
13
13
|
* The `Readable` stream from which REPL input will be read.
|
|
14
14
|
* @default process.stdin
|
|
15
15
|
*/
|
|
16
|
-
input?: NodeJS.ReadableStream;
|
|
16
|
+
input?: NodeJS.ReadableStream | undefined;
|
|
17
17
|
/**
|
|
18
18
|
* The `Writable` stream to which REPL output will be written.
|
|
19
19
|
* @default process.stdout
|
|
20
20
|
*/
|
|
21
|
-
output?: NodeJS.WritableStream;
|
|
21
|
+
output?: NodeJS.WritableStream | undefined;
|
|
22
22
|
/**
|
|
23
23
|
* If `true`, specifies that the output should be treated as a TTY terminal, and have
|
|
24
24
|
* ANSI/VT100 escape codes written to it.
|
|
25
25
|
* Default: checking the value of the `isTTY` property on the output stream upon
|
|
26
26
|
* instantiation.
|
|
27
27
|
*/
|
|
28
|
-
terminal?: boolean;
|
|
28
|
+
terminal?: boolean | undefined;
|
|
29
29
|
/**
|
|
30
30
|
* The function to be used when evaluating each given line of input.
|
|
31
31
|
* Default: an async wrapper for the JavaScript `eval()` function. An `eval` function can
|
|
@@ -35,45 +35,45 @@ declare module 'repl' {
|
|
|
35
35
|
* @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_default_evaluation
|
|
36
36
|
* @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_custom_evaluation_functions
|
|
37
37
|
*/
|
|
38
|
-
eval?: REPLEval;
|
|
38
|
+
eval?: REPLEval | undefined;
|
|
39
39
|
/**
|
|
40
40
|
* Defines if the repl prints output previews or not.
|
|
41
41
|
* @default `true` Always `false` in case `terminal` is falsy.
|
|
42
42
|
*/
|
|
43
|
-
preview?: boolean;
|
|
43
|
+
preview?: boolean | undefined;
|
|
44
44
|
/**
|
|
45
45
|
* If `true`, specifies that the default `writer` function should include ANSI color
|
|
46
46
|
* styling to REPL output. If a custom `writer` function is provided then this has no
|
|
47
47
|
* effect.
|
|
48
48
|
* Default: the REPL instance's `terminal` value.
|
|
49
49
|
*/
|
|
50
|
-
useColors?: boolean;
|
|
50
|
+
useColors?: boolean | undefined;
|
|
51
51
|
/**
|
|
52
52
|
* If `true`, specifies that the default evaluation function will use the JavaScript
|
|
53
53
|
* `global` as the context as opposed to creating a new separate context for the REPL
|
|
54
54
|
* instance. The node CLI REPL sets this value to `true`.
|
|
55
55
|
* Default: `false`.
|
|
56
56
|
*/
|
|
57
|
-
useGlobal?: boolean;
|
|
57
|
+
useGlobal?: boolean | undefined;
|
|
58
58
|
/**
|
|
59
59
|
* If `true`, specifies that the default writer will not output the return value of a
|
|
60
60
|
* command if it evaluates to `undefined`.
|
|
61
61
|
* Default: `false`.
|
|
62
62
|
*/
|
|
63
|
-
ignoreUndefined?: boolean;
|
|
63
|
+
ignoreUndefined?: boolean | undefined;
|
|
64
64
|
/**
|
|
65
65
|
* The function to invoke to format the output of each command before writing to `output`.
|
|
66
66
|
* Default: a wrapper for `util.inspect`.
|
|
67
67
|
*
|
|
68
68
|
* @see https://nodejs.org/dist/latest-v10.x/docs/api/repl.html#repl_customizing_repl_output
|
|
69
69
|
*/
|
|
70
|
-
writer?: REPLWriter;
|
|
70
|
+
writer?: REPLWriter | undefined;
|
|
71
71
|
/**
|
|
72
72
|
* An optional function used for custom Tab auto completion.
|
|
73
73
|
*
|
|
74
74
|
* @see https://nodejs.org/dist/latest-v11.x/docs/api/readline.html#readline_use_of_the_completer_function
|
|
75
75
|
*/
|
|
76
|
-
completer?: Completer | AsyncCompleter;
|
|
76
|
+
completer?: Completer | AsyncCompleter | undefined;
|
|
77
77
|
/**
|
|
78
78
|
* A flag that specifies whether the default evaluator executes all JavaScript commands in
|
|
79
79
|
* strict mode or default (sloppy) mode.
|
|
@@ -82,13 +82,13 @@ declare module 'repl' {
|
|
|
82
82
|
* - `repl.REPL_MODE_STRICT` - evaluates expressions in strict mode. This is equivalent to
|
|
83
83
|
* prefacing every repl statement with `'use strict'`.
|
|
84
84
|
*/
|
|
85
|
-
replMode?: typeof REPL_MODE_SLOPPY | typeof REPL_MODE_STRICT;
|
|
85
|
+
replMode?: typeof REPL_MODE_SLOPPY | typeof REPL_MODE_STRICT | undefined;
|
|
86
86
|
/**
|
|
87
87
|
* Stop evaluating the current piece of code when `SIGINT` is received, i.e. `Ctrl+C` is
|
|
88
88
|
* pressed. This cannot be used together with a custom `eval` function.
|
|
89
89
|
* Default: `false`.
|
|
90
90
|
*/
|
|
91
|
-
breakEvalOnSigint?: boolean;
|
|
91
|
+
breakEvalOnSigint?: boolean | undefined;
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
type REPLEval = (this: REPLServer, evalCmd: string, context: Context, file: string, cb: (err: Error | null, result: any) => void) => void;
|
|
@@ -106,7 +106,7 @@ declare module 'repl' {
|
|
|
106
106
|
/**
|
|
107
107
|
* Help text to be displayed when `.help` is entered.
|
|
108
108
|
*/
|
|
109
|
-
help?: string;
|
|
109
|
+
help?: string | undefined;
|
|
110
110
|
/**
|
|
111
111
|
* The function to execute, optionally accepting a single string argument.
|
|
112
112
|
*/
|
node v14.17/stream.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ declare module 'stream' {
|
|
|
2
2
|
import EventEmitter = require('events');
|
|
3
3
|
|
|
4
4
|
class internal extends EventEmitter {
|
|
5
|
-
pipe<T extends NodeJS.WritableStream>(destination: T, options?: { end?: boolean; }): T;
|
|
5
|
+
pipe<T extends NodeJS.WritableStream>(destination: T, options?: { end?: boolean | undefined; }): T;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
namespace internal {
|
|
@@ -11,12 +11,12 @@ declare module 'stream' {
|
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
interface ReadableOptions {
|
|
14
|
-
highWaterMark?: number;
|
|
15
|
-
encoding?: BufferEncoding;
|
|
16
|
-
objectMode?: boolean;
|
|
14
|
+
highWaterMark?: number | undefined;
|
|
15
|
+
encoding?: BufferEncoding | undefined;
|
|
16
|
+
objectMode?: boolean | undefined;
|
|
17
17
|
read?(this: Readable, size: number): void;
|
|
18
18
|
destroy?(this: Readable, error: Error | null, callback: (error: Error | null) => void): void;
|
|
19
|
-
autoDestroy?: boolean;
|
|
19
|
+
autoDestroy?: boolean | undefined;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
class Readable extends Stream implements NodeJS.ReadableStream {
|
|
@@ -125,16 +125,16 @@ declare module 'stream' {
|
|
|
125
125
|
}
|
|
126
126
|
|
|
127
127
|
interface WritableOptions {
|
|
128
|
-
highWaterMark?: number;
|
|
129
|
-
decodeStrings?: boolean;
|
|
130
|
-
defaultEncoding?: BufferEncoding;
|
|
131
|
-
objectMode?: boolean;
|
|
132
|
-
emitClose?: boolean;
|
|
128
|
+
highWaterMark?: number | undefined;
|
|
129
|
+
decodeStrings?: boolean | undefined;
|
|
130
|
+
defaultEncoding?: BufferEncoding | undefined;
|
|
131
|
+
objectMode?: boolean | undefined;
|
|
132
|
+
emitClose?: boolean | undefined;
|
|
133
133
|
write?(this: Writable, chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
|
|
134
134
|
writev?(this: Writable, chunks: Array<{ chunk: any, encoding: BufferEncoding }>, callback: (error?: Error | null) => void): void;
|
|
135
135
|
destroy?(this: Writable, error: Error | null, callback: (error: Error | null) => void): void;
|
|
136
136
|
final?(this: Writable, callback: (error?: Error | null) => void): void;
|
|
137
|
-
autoDestroy?: boolean;
|
|
137
|
+
autoDestroy?: boolean | undefined;
|
|
138
138
|
}
|
|
139
139
|
|
|
140
140
|
class Writable extends Stream implements NodeJS.WritableStream {
|
|
@@ -229,12 +229,12 @@ declare module 'stream' {
|
|
|
229
229
|
}
|
|
230
230
|
|
|
231
231
|
interface DuplexOptions extends ReadableOptions, WritableOptions {
|
|
232
|
-
allowHalfOpen?: boolean;
|
|
233
|
-
readableObjectMode?: boolean;
|
|
234
|
-
writableObjectMode?: boolean;
|
|
235
|
-
readableHighWaterMark?: number;
|
|
236
|
-
writableHighWaterMark?: number;
|
|
237
|
-
writableCorked?: number;
|
|
232
|
+
allowHalfOpen?: boolean | undefined;
|
|
233
|
+
readableObjectMode?: boolean | undefined;
|
|
234
|
+
writableObjectMode?: boolean | undefined;
|
|
235
|
+
readableHighWaterMark?: number | undefined;
|
|
236
|
+
writableHighWaterMark?: number | undefined;
|
|
237
|
+
writableCorked?: number | undefined;
|
|
238
238
|
read?(this: Duplex, size: number): void;
|
|
239
239
|
write?(this: Duplex, chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
|
|
240
240
|
writev?(this: Duplex, chunks: Array<{ chunk: any, encoding: BufferEncoding }>, callback: (error?: Error | null) => void): void;
|
|
@@ -287,9 +287,9 @@ declare module 'stream' {
|
|
|
287
287
|
class PassThrough extends Transform { }
|
|
288
288
|
|
|
289
289
|
interface FinishedOptions {
|
|
290
|
-
error?: boolean;
|
|
291
|
-
readable?: boolean;
|
|
292
|
-
writable?: boolean;
|
|
290
|
+
error?: boolean | undefined;
|
|
291
|
+
readable?: boolean | undefined;
|
|
292
|
+
writable?: boolean | undefined;
|
|
293
293
|
}
|
|
294
294
|
function finished(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, options: FinishedOptions, callback: (err?: NodeJS.ErrnoException | null) => void): () => void;
|
|
295
295
|
function finished(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, callback: (err?: NodeJS.ErrnoException | null) => void): () => void;
|