@types/node 14.18.6 → 15.0.0
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.18 → node}/LICENSE +0 -0
- node/README.md +16 -0
- node/assert/strict.d.ts +4 -0
- node v14.18/assert.d.ts → node/assert.d.ts +8 -7
- node v14.18/async_hooks.d.ts → node/async_hooks.d.ts +11 -7
- node/base.d.ts +19 -0
- node v14.18/buffer.d.ts → node/buffer.d.ts +4 -3
- node v14.18/child_process.d.ts → node/child_process.d.ts +71 -71
- node v14.18/cluster.d.ts → node/cluster.d.ts +17 -16
- node v14.18/console.d.ts → node/console.d.ts +17 -22
- node v14.18/constants.d.ts → node/constants.d.ts +9 -8
- node v14.18/crypto.d.ts → node/crypto.d.ts +139 -54
- node v14.18/dgram.d.ts → node/dgram.d.ts +24 -23
- node/dns/promises.d.ts +101 -0
- node/dns.d.ts +326 -0
- node v14.18/domain.d.ts → node/domain.d.ts +5 -4
- node v14.18/events.d.ts → node/events.d.ts +13 -8
- node v14.18/fs/promises.d.ts → node/fs/promises.d.ts +23 -30
- node v14.18/fs.d.ts → node/fs.d.ts +85 -97
- node v14.18/globals.d.ts → node/globals.d.ts +60 -24
- {node v14.18 → node}/globals.global.d.ts +0 -0
- node v14.18/http.d.ts → node/http.d.ts +114 -178
- node v14.18/http2.d.ts → node/http2.d.ts +86 -79
- node/https.d.ts +40 -0
- node v14.18/index.d.ts → node/index.d.ts +15 -55
- node v14.18/inspector.d.ts → node/inspector.d.ts +159 -162
- node v14.18/module.d.ts → node/module.d.ts +6 -5
- node v14.18/net.d.ts → node/net.d.ts +77 -45
- node v14.18/os.d.ts → node/os.d.ts +4 -3
- node v14.18/package.json → node/package.json +25 -19
- node v14.18/path.d.ts → node/path.d.ts +10 -9
- node v14.18/perf_hooks.d.ts → node/perf_hooks.d.ts +10 -9
- node v14.18/process.d.ts → node/process.d.ts +58 -18
- node v14.18/punycode.d.ts → node/punycode.d.ts +11 -3
- node v14.18/querystring.d.ts → node/querystring.d.ts +7 -6
- node v14.18/readline.d.ts → node/readline.d.ts +19 -19
- node v14.18/repl.d.ts → node/repl.d.ts +24 -23
- node/stream/promises.d.ts +71 -0
- node v14.18/stream.d.ts → node/stream.d.ts +170 -61
- node v14.18/string_decoder.d.ts → node/string_decoder.d.ts +4 -3
- node/timers/promises.d.ts +17 -0
- node v14.18/timers.d.ts → node/timers.d.ts +20 -5
- node v14.18/tls.d.ts → node/tls.d.ts +56 -57
- node v14.18/trace_events.d.ts → node/trace_events.d.ts +4 -3
- node/ts3.6/assert.d.ts +103 -0
- node/ts3.6/base.d.ts +66 -0
- node/ts3.6/index.d.ts +7 -0
- node v14.18/tty.d.ts → node/tty.d.ts +5 -4
- node v14.18/url.d.ts → node/url.d.ts +21 -20
- node v14.18/util.d.ts → node/util.d.ts +7 -12
- node v14.18/v8.d.ts → node/v8.d.ts +5 -4
- node v14.18/vm.d.ts → node/vm.d.ts +29 -28
- node v14.18/wasi.d.ts → node/wasi.d.ts +11 -10
- node v14.18/worker_threads.d.ts → node/worker_threads.d.ts +27 -23
- node v14.18/zlib.d.ts → node/zlib.d.ts +21 -20
- node v14.18/README.md +0 -16
- node v14.18/dns.d.ts +0 -387
- node v14.18/https.d.ts +0 -142
{node v14.18 → node}/LICENSE
RENAMED
|
File without changes
|
node/README.md
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Installation
|
|
2
|
+
> `npm install --save @types/node`
|
|
3
|
+
|
|
4
|
+
# Summary
|
|
5
|
+
This package contains type definitions for Node.js (http://nodejs.org/).
|
|
6
|
+
|
|
7
|
+
# Details
|
|
8
|
+
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
|
|
9
|
+
|
|
10
|
+
### Additional Details
|
|
11
|
+
* Last updated: Mon, 26 Apr 2021 19:31:25 GMT
|
|
12
|
+
* Dependencies: none
|
|
13
|
+
* Global values: `AbortController`, `AbortSignal`, `Buffer`, `__dirname`, `__filename`, `clearImmediate`, `clearInterval`, `clearTimeout`, `console`, `exports`, `global`, `module`, `process`, `queueMicrotask`, `require`, `setImmediate`, `setInterval`, `setTimeout`
|
|
14
|
+
|
|
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), [Bruno Scheufler](https://github.com/brunoscheufler), [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), [Hoàng Văn Khải](https://github.com/KSXGitHub), [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), [Minh Son Nguyen](https://github.com/nguymin4), [Junxiao Shi](https://github.com/yoursunny), [Ilia Baryshnikov](https://github.com/qwelias), [ExE Boss](https://github.com/ExE-Boss), [Surasak Chaisurin](https://github.com/Ryan-Willpower), [Piotr Błażejewicz](https://github.com/peterblazejewicz), [Anna Henningsen](https://github.com/addaleax), [Jason Kwok](https://github.com/JasonHK), [Victor Perin](https://github.com/victorperin), and [Yongsheng Zhang](https://github.com/ZYSzys).
|
node/assert/strict.d.ts
ADDED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
declare module 'node:assert' {
|
|
2
|
+
import assert = require('assert');
|
|
3
|
+
export = assert;
|
|
4
|
+
}
|
|
5
|
+
|
|
1
6
|
declare module 'assert' {
|
|
2
7
|
/** An alias of `assert.ok()`. */
|
|
3
8
|
function assert(value: any, message?: string | Error): asserts value;
|
|
@@ -11,16 +16,16 @@ declare module 'assert' {
|
|
|
11
16
|
|
|
12
17
|
constructor(options?: {
|
|
13
18
|
/** If provided, the error message is set to this value. */
|
|
14
|
-
message?: string
|
|
19
|
+
message?: string;
|
|
15
20
|
/** The `actual` property on the error instance. */
|
|
16
21
|
actual?: any;
|
|
17
22
|
/** The `expected` property on the error instance. */
|
|
18
23
|
expected?: any;
|
|
19
24
|
/** The `operator` property on the error instance. */
|
|
20
|
-
operator?: string
|
|
25
|
+
operator?: string;
|
|
21
26
|
/** If provided, the generated stack trace omits frames before this function. */
|
|
22
27
|
// tslint:disable-next-line:ban-types
|
|
23
|
-
stackStartFn?: Function
|
|
28
|
+
stackStartFn?: Function;
|
|
24
29
|
});
|
|
25
30
|
}
|
|
26
31
|
|
|
@@ -122,7 +127,3 @@ declare module 'assert' {
|
|
|
122
127
|
|
|
123
128
|
export = assert;
|
|
124
129
|
}
|
|
125
|
-
declare module 'node:assert' {
|
|
126
|
-
import assert = require('assert');
|
|
127
|
-
export = assert;
|
|
128
|
-
}
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Async Hooks module: https://nodejs.org/api/async_hooks.html
|
|
3
|
+
*/
|
|
4
|
+
declare module 'node:async_hooks' {
|
|
5
|
+
export * from 'async_hooks';
|
|
6
|
+
}
|
|
7
|
+
|
|
1
8
|
/**
|
|
2
9
|
* Async Hooks module: https://nodejs.org/api/async_hooks.html
|
|
3
10
|
*/
|
|
@@ -85,18 +92,18 @@ declare module 'async_hooks' {
|
|
|
85
92
|
interface AsyncResourceOptions {
|
|
86
93
|
/**
|
|
87
94
|
* The ID of the execution context that created this async event.
|
|
88
|
-
*
|
|
95
|
+
* Default: `executionAsyncId()`
|
|
89
96
|
*/
|
|
90
|
-
triggerAsyncId?: number
|
|
97
|
+
triggerAsyncId?: number;
|
|
91
98
|
|
|
92
99
|
/**
|
|
93
100
|
* Disables automatic `emitDestroy` when the object is garbage collected.
|
|
94
101
|
* This usually does not need to be set (even if `emitDestroy` is called
|
|
95
102
|
* manually), unless the resource's `asyncId` is retrieved and the
|
|
96
103
|
* sensitive API's `emitDestroy` is called with it.
|
|
97
|
-
*
|
|
104
|
+
* Default: `false`
|
|
98
105
|
*/
|
|
99
|
-
requireManualDestroy?: boolean
|
|
106
|
+
requireManualDestroy?: boolean;
|
|
100
107
|
}
|
|
101
108
|
|
|
102
109
|
/**
|
|
@@ -224,6 +231,3 @@ declare module 'async_hooks' {
|
|
|
224
231
|
enterWith(store: T): void;
|
|
225
232
|
}
|
|
226
233
|
}
|
|
227
|
-
declare module 'node:async_hooks' {
|
|
228
|
-
export * from 'async_hooks';
|
|
229
|
-
}
|
node/base.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// NOTE: These definitions support NodeJS and TypeScript 3.7.
|
|
2
|
+
|
|
3
|
+
// NOTE: TypeScript version-specific augmentations can be found in the following paths:
|
|
4
|
+
// - ~/base.d.ts - Shared definitions common to all TypeScript versions
|
|
5
|
+
// - ~/index.d.ts - Definitions specific to TypeScript 2.1
|
|
6
|
+
// - ~/ts3.7/base.d.ts - Definitions specific to TypeScript 3.7
|
|
7
|
+
// - ~/ts3.7/index.d.ts - Definitions specific to TypeScript 3.7 with assert pulled in
|
|
8
|
+
|
|
9
|
+
// Reference required types from the default lib:
|
|
10
|
+
/// <reference lib="es2018" />
|
|
11
|
+
/// <reference lib="esnext.asynciterable" />
|
|
12
|
+
/// <reference lib="esnext.intl" />
|
|
13
|
+
/// <reference lib="esnext.bigint" />
|
|
14
|
+
|
|
15
|
+
// Base definitions for all NodeJS modules that are not specific to any version of TypeScript:
|
|
16
|
+
/// <reference path="ts3.6/base.d.ts" />
|
|
17
|
+
|
|
18
|
+
// TypeScript 3.7-specific augmentations:
|
|
19
|
+
/// <reference path="assert.d.ts" />
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
declare module 'node:buffer' {
|
|
2
|
+
export * from 'buffer';
|
|
3
|
+
}
|
|
4
|
+
|
|
1
5
|
declare module 'buffer' {
|
|
2
6
|
export const INSPECT_MAX_BYTES: number;
|
|
3
7
|
export const kMaxLength: number;
|
|
@@ -20,6 +24,3 @@ declare module 'buffer' {
|
|
|
20
24
|
|
|
21
25
|
export { BuffType as Buffer };
|
|
22
26
|
}
|
|
23
|
-
declare module 'node:buffer' {
|
|
24
|
-
export * from 'buffer';
|
|
25
|
-
}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
+
declare module 'node:child_process' {
|
|
2
|
+
export * from 'child_process';
|
|
3
|
+
}
|
|
4
|
+
|
|
1
5
|
declare module 'child_process' {
|
|
2
|
-
import { BaseEncodingOptions } from 'fs';
|
|
3
|
-
import * as events from 'events';
|
|
4
|
-
import * as net from 'net';
|
|
5
|
-
import { Writable, Readable, Stream, Pipe } from 'stream';
|
|
6
|
+
import { BaseEncodingOptions } from 'node:fs';
|
|
7
|
+
import * as events from 'node:events';
|
|
8
|
+
import * as net from 'node:net';
|
|
9
|
+
import { Writable, Readable, Stream, Pipe } from 'node:stream';
|
|
6
10
|
|
|
7
11
|
type Serializable = string | object | number | boolean;
|
|
8
12
|
type SendHandle = net.Socket | net.Server;
|
|
@@ -11,7 +15,7 @@ declare module 'child_process' {
|
|
|
11
15
|
stdin: Writable | null;
|
|
12
16
|
stdout: Readable | null;
|
|
13
17
|
stderr: Readable | null;
|
|
14
|
-
readonly channel?: Pipe | null
|
|
18
|
+
readonly channel?: Pipe | null;
|
|
15
19
|
readonly stdio: [
|
|
16
20
|
Writable | null, // stdin
|
|
17
21
|
Readable | null, // stdout
|
|
@@ -119,7 +123,7 @@ declare module 'child_process' {
|
|
|
119
123
|
}
|
|
120
124
|
|
|
121
125
|
interface MessageOptions {
|
|
122
|
-
keepOpen?: boolean
|
|
126
|
+
keepOpen?: boolean;
|
|
123
127
|
}
|
|
124
128
|
|
|
125
129
|
type StdioOptions = "pipe" | "ignore" | "inherit" | Array<("pipe" | "ipc" | "ignore" | "inherit" | Stream | number | null | undefined)>;
|
|
@@ -131,40 +135,40 @@ declare module 'child_process' {
|
|
|
131
135
|
* Specify the kind of serialization used for sending messages between processes.
|
|
132
136
|
* @default 'json'
|
|
133
137
|
*/
|
|
134
|
-
serialization?: SerializationType
|
|
138
|
+
serialization?: SerializationType;
|
|
135
139
|
}
|
|
136
140
|
|
|
137
141
|
interface ProcessEnvOptions {
|
|
138
|
-
uid?: number
|
|
139
|
-
gid?: number
|
|
140
|
-
cwd?: string
|
|
141
|
-
env?: NodeJS.ProcessEnv
|
|
142
|
+
uid?: number;
|
|
143
|
+
gid?: number;
|
|
144
|
+
cwd?: string;
|
|
145
|
+
env?: NodeJS.ProcessEnv;
|
|
142
146
|
}
|
|
143
147
|
|
|
144
148
|
interface CommonOptions extends ProcessEnvOptions {
|
|
145
149
|
/**
|
|
146
150
|
* @default true
|
|
147
151
|
*/
|
|
148
|
-
windowsHide?: boolean
|
|
152
|
+
windowsHide?: boolean;
|
|
149
153
|
/**
|
|
150
154
|
* @default 0
|
|
151
155
|
*/
|
|
152
|
-
timeout?: number
|
|
156
|
+
timeout?: number;
|
|
153
157
|
}
|
|
154
158
|
|
|
155
159
|
interface CommonSpawnOptions extends CommonOptions, MessagingOptions {
|
|
156
|
-
argv0?: string
|
|
157
|
-
stdio?: StdioOptions
|
|
158
|
-
shell?: boolean | string
|
|
159
|
-
windowsVerbatimArguments?: boolean
|
|
160
|
+
argv0?: string;
|
|
161
|
+
stdio?: StdioOptions;
|
|
162
|
+
shell?: boolean | string;
|
|
163
|
+
windowsVerbatimArguments?: boolean;
|
|
160
164
|
}
|
|
161
165
|
|
|
162
166
|
interface SpawnOptions extends CommonSpawnOptions {
|
|
163
|
-
detached?: boolean
|
|
167
|
+
detached?: boolean;
|
|
164
168
|
}
|
|
165
169
|
|
|
166
170
|
interface SpawnOptionsWithoutStdio extends SpawnOptions {
|
|
167
|
-
stdio?: 'pipe' | Array<null | undefined | 'pipe'
|
|
171
|
+
stdio?: 'pipe' | Array<null | undefined | 'pipe'>;
|
|
168
172
|
}
|
|
169
173
|
|
|
170
174
|
type StdioNull = 'inherit' | 'ignore' | Stream;
|
|
@@ -263,9 +267,9 @@ declare module 'child_process' {
|
|
|
263
267
|
function spawn(command: string, args: ReadonlyArray<string>, options: SpawnOptions): ChildProcess;
|
|
264
268
|
|
|
265
269
|
interface ExecOptions extends CommonOptions {
|
|
266
|
-
shell?: string
|
|
267
|
-
maxBuffer?: number
|
|
268
|
-
killSignal?: NodeJS.Signals | number
|
|
270
|
+
shell?: string;
|
|
271
|
+
maxBuffer?: number;
|
|
272
|
+
killSignal?: NodeJS.Signals | number;
|
|
269
273
|
}
|
|
270
274
|
|
|
271
275
|
interface ExecOptionsWithStringEncoding extends ExecOptions {
|
|
@@ -277,10 +281,10 @@ declare module 'child_process' {
|
|
|
277
281
|
}
|
|
278
282
|
|
|
279
283
|
interface ExecException extends Error {
|
|
280
|
-
cmd?: string
|
|
281
|
-
killed?: boolean
|
|
282
|
-
code?: number
|
|
283
|
-
signal?: NodeJS.Signals
|
|
284
|
+
cmd?: string;
|
|
285
|
+
killed?: boolean;
|
|
286
|
+
code?: number;
|
|
287
|
+
signal?: NodeJS.Signals;
|
|
284
288
|
}
|
|
285
289
|
|
|
286
290
|
// no `options` definitely means stdout/stderr are `string`.
|
|
@@ -324,10 +328,10 @@ declare module 'child_process' {
|
|
|
324
328
|
}
|
|
325
329
|
|
|
326
330
|
interface ExecFileOptions extends CommonOptions {
|
|
327
|
-
maxBuffer?: number
|
|
328
|
-
killSignal?: NodeJS.Signals | number
|
|
329
|
-
windowsVerbatimArguments?: boolean
|
|
330
|
-
shell?: boolean | string
|
|
331
|
+
maxBuffer?: number;
|
|
332
|
+
killSignal?: NodeJS.Signals | number;
|
|
333
|
+
windowsVerbatimArguments?: boolean;
|
|
334
|
+
shell?: boolean | string;
|
|
331
335
|
}
|
|
332
336
|
interface ExecFileOptionsWithStringEncoding extends ExecFileOptions {
|
|
333
337
|
encoding: BufferEncoding;
|
|
@@ -428,71 +432,71 @@ declare module 'child_process' {
|
|
|
428
432
|
}
|
|
429
433
|
|
|
430
434
|
interface ForkOptions extends ProcessEnvOptions, MessagingOptions {
|
|
431
|
-
execPath?: string
|
|
432
|
-
execArgv?: string[]
|
|
433
|
-
silent?: boolean
|
|
434
|
-
stdio?: StdioOptions
|
|
435
|
-
detached?: boolean
|
|
436
|
-
windowsVerbatimArguments?: boolean
|
|
435
|
+
execPath?: string;
|
|
436
|
+
execArgv?: string[];
|
|
437
|
+
silent?: boolean;
|
|
438
|
+
stdio?: StdioOptions;
|
|
439
|
+
detached?: boolean;
|
|
440
|
+
windowsVerbatimArguments?: boolean;
|
|
437
441
|
}
|
|
438
442
|
function fork(modulePath: string, options?: ForkOptions): ChildProcess;
|
|
439
443
|
function fork(modulePath: string, args?: ReadonlyArray<string>, options?: ForkOptions): ChildProcess;
|
|
440
444
|
|
|
441
445
|
interface SpawnSyncOptions extends CommonSpawnOptions {
|
|
442
|
-
input?: string | NodeJS.ArrayBufferView
|
|
443
|
-
killSignal?: NodeJS.Signals | number
|
|
444
|
-
maxBuffer?: number
|
|
445
|
-
encoding?: BufferEncoding | 'buffer' | null
|
|
446
|
+
input?: string | NodeJS.ArrayBufferView;
|
|
447
|
+
killSignal?: NodeJS.Signals | number;
|
|
448
|
+
maxBuffer?: number;
|
|
449
|
+
encoding?: BufferEncoding | 'buffer' | null;
|
|
446
450
|
}
|
|
447
451
|
interface SpawnSyncOptionsWithStringEncoding extends SpawnSyncOptions {
|
|
448
452
|
encoding: BufferEncoding;
|
|
449
453
|
}
|
|
450
454
|
interface SpawnSyncOptionsWithBufferEncoding extends SpawnSyncOptions {
|
|
451
|
-
encoding?: 'buffer' | null
|
|
455
|
+
encoding?: 'buffer' | null;
|
|
452
456
|
}
|
|
453
457
|
interface SpawnSyncReturns<T> {
|
|
454
458
|
pid: number;
|
|
455
|
-
output:
|
|
459
|
+
output: string[];
|
|
456
460
|
stdout: T;
|
|
457
461
|
stderr: T;
|
|
458
462
|
status: number | null;
|
|
459
463
|
signal: NodeJS.Signals | null;
|
|
460
|
-
error?: Error
|
|
464
|
+
error?: Error;
|
|
461
465
|
}
|
|
462
466
|
function spawnSync(command: string): SpawnSyncReturns<Buffer>;
|
|
463
467
|
function spawnSync(command: string, options?: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns<string>;
|
|
464
468
|
function spawnSync(command: string, options?: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns<Buffer>;
|
|
465
|
-
function spawnSync(command: string, options?: SpawnSyncOptions): SpawnSyncReturns<
|
|
469
|
+
function spawnSync(command: string, options?: SpawnSyncOptions): SpawnSyncReturns<Buffer>;
|
|
466
470
|
function spawnSync(command: string, args?: ReadonlyArray<string>, options?: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns<string>;
|
|
467
471
|
function spawnSync(command: string, args?: ReadonlyArray<string>, options?: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns<Buffer>;
|
|
468
|
-
function spawnSync(command: string, args?: ReadonlyArray<string>, options?: SpawnSyncOptions): SpawnSyncReturns<
|
|
472
|
+
function spawnSync(command: string, args?: ReadonlyArray<string>, options?: SpawnSyncOptions): SpawnSyncReturns<Buffer>;
|
|
469
473
|
|
|
470
474
|
interface ExecSyncOptions extends CommonOptions {
|
|
471
|
-
input?: string | Uint8Array
|
|
472
|
-
stdio?: StdioOptions
|
|
473
|
-
shell?: string
|
|
474
|
-
killSignal?: NodeJS.Signals | number
|
|
475
|
-
maxBuffer?: number
|
|
476
|
-
encoding?: BufferEncoding | 'buffer' | null
|
|
475
|
+
input?: string | Uint8Array;
|
|
476
|
+
stdio?: StdioOptions;
|
|
477
|
+
shell?: string;
|
|
478
|
+
killSignal?: NodeJS.Signals | number;
|
|
479
|
+
maxBuffer?: number;
|
|
480
|
+
encoding?: BufferEncoding | 'buffer' | null;
|
|
477
481
|
}
|
|
478
482
|
interface ExecSyncOptionsWithStringEncoding extends ExecSyncOptions {
|
|
479
483
|
encoding: BufferEncoding;
|
|
480
484
|
}
|
|
481
485
|
interface ExecSyncOptionsWithBufferEncoding extends ExecSyncOptions {
|
|
482
|
-
encoding?: 'buffer' | null
|
|
486
|
+
encoding?: 'buffer' | null;
|
|
483
487
|
}
|
|
484
488
|
function execSync(command: string): Buffer;
|
|
485
|
-
function execSync(command: string, options
|
|
486
|
-
function execSync(command: string, options
|
|
487
|
-
function execSync(command: string, options?: ExecSyncOptions):
|
|
489
|
+
function execSync(command: string, options?: ExecSyncOptionsWithStringEncoding): string;
|
|
490
|
+
function execSync(command: string, options?: ExecSyncOptionsWithBufferEncoding): Buffer;
|
|
491
|
+
function execSync(command: string, options?: ExecSyncOptions): Buffer;
|
|
488
492
|
|
|
489
493
|
interface ExecFileSyncOptions extends CommonOptions {
|
|
490
|
-
input?: string | NodeJS.ArrayBufferView
|
|
491
|
-
stdio?: StdioOptions
|
|
492
|
-
killSignal?: NodeJS.Signals | number
|
|
493
|
-
maxBuffer?: number
|
|
494
|
-
encoding?: BufferEncoding
|
|
495
|
-
shell?: boolean | string
|
|
494
|
+
input?: string | NodeJS.ArrayBufferView;
|
|
495
|
+
stdio?: StdioOptions;
|
|
496
|
+
killSignal?: NodeJS.Signals | number;
|
|
497
|
+
maxBuffer?: number;
|
|
498
|
+
encoding?: BufferEncoding;
|
|
499
|
+
shell?: boolean | string;
|
|
496
500
|
}
|
|
497
501
|
interface ExecFileSyncOptionsWithStringEncoding extends ExecFileSyncOptions {
|
|
498
502
|
encoding: BufferEncoding;
|
|
@@ -501,14 +505,10 @@ declare module 'child_process' {
|
|
|
501
505
|
encoding: BufferEncoding; // specify `null`.
|
|
502
506
|
}
|
|
503
507
|
function execFileSync(command: string): Buffer;
|
|
504
|
-
function execFileSync(command: string, options
|
|
505
|
-
function execFileSync(command: string, options
|
|
506
|
-
function execFileSync(command: string, options?: ExecFileSyncOptions):
|
|
507
|
-
function execFileSync(command: string, args
|
|
508
|
-
function execFileSync(command: string, args
|
|
509
|
-
function execFileSync(command: string, args
|
|
510
|
-
function execFileSync(command: string, args?: ReadonlyArray<string>, options?: ExecFileSyncOptions): string | Buffer;
|
|
511
|
-
}
|
|
512
|
-
declare module 'node:child_process' {
|
|
513
|
-
export * from 'child_process';
|
|
508
|
+
function execFileSync(command: string, options?: ExecFileSyncOptionsWithStringEncoding): string;
|
|
509
|
+
function execFileSync(command: string, options?: ExecFileSyncOptionsWithBufferEncoding): Buffer;
|
|
510
|
+
function execFileSync(command: string, options?: ExecFileSyncOptions): Buffer;
|
|
511
|
+
function execFileSync(command: string, args?: ReadonlyArray<string>, options?: ExecFileSyncOptionsWithStringEncoding): string;
|
|
512
|
+
function execFileSync(command: string, args?: ReadonlyArray<string>, options?: ExecFileSyncOptionsWithBufferEncoding): Buffer;
|
|
513
|
+
function execFileSync(command: string, args?: ReadonlyArray<string>, options?: ExecFileSyncOptions): Buffer;
|
|
514
514
|
}
|
|
@@ -1,18 +1,22 @@
|
|
|
1
|
+
declare module 'node:cluster' {
|
|
2
|
+
export * from 'cluster';
|
|
3
|
+
}
|
|
4
|
+
|
|
1
5
|
declare module 'cluster' {
|
|
2
|
-
import * as child from 'child_process';
|
|
3
|
-
import EventEmitter = require('events');
|
|
4
|
-
import * as net from 'net';
|
|
6
|
+
import * as child from 'node:child_process';
|
|
7
|
+
import EventEmitter = require('node:events');
|
|
8
|
+
import * as net from 'node:net';
|
|
5
9
|
|
|
6
10
|
// interfaces
|
|
7
11
|
interface ClusterSettings {
|
|
8
|
-
execArgv?: string[]
|
|
9
|
-
exec?: string
|
|
10
|
-
args?: string[]
|
|
11
|
-
silent?: boolean
|
|
12
|
-
stdio?: any[]
|
|
13
|
-
uid?: number
|
|
14
|
-
gid?: number
|
|
15
|
-
inspectPort?: number | (() => number)
|
|
12
|
+
execArgv?: string[]; // default: process.execArgv
|
|
13
|
+
exec?: string;
|
|
14
|
+
args?: string[];
|
|
15
|
+
silent?: boolean;
|
|
16
|
+
stdio?: any[];
|
|
17
|
+
uid?: number;
|
|
18
|
+
gid?: number;
|
|
19
|
+
inspectPort?: number | (() => number);
|
|
16
20
|
}
|
|
17
21
|
|
|
18
22
|
interface Address {
|
|
@@ -99,8 +103,8 @@ declare module 'cluster' {
|
|
|
99
103
|
schedulingPolicy: number;
|
|
100
104
|
settings: ClusterSettings;
|
|
101
105
|
setupMaster(settings?: ClusterSettings): void;
|
|
102
|
-
worker?: Worker
|
|
103
|
-
workers?: NodeJS.Dict<Worker
|
|
106
|
+
worker?: Worker;
|
|
107
|
+
workers?: NodeJS.Dict<Worker>;
|
|
104
108
|
|
|
105
109
|
readonly SCHED_NONE: number;
|
|
106
110
|
readonly SCHED_RR: number;
|
|
@@ -260,6 +264,3 @@ declare module 'cluster' {
|
|
|
260
264
|
|
|
261
265
|
function eventNames(): string[];
|
|
262
266
|
}
|
|
263
|
-
declare module 'node:cluster' {
|
|
264
|
-
export * from 'cluster';
|
|
265
|
-
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
declare module 'console' {
|
|
2
|
-
import console = require('node:console');
|
|
1
|
+
declare module 'node:console' {
|
|
3
2
|
export = console;
|
|
4
3
|
}
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
|
|
5
|
+
declare module 'console' {
|
|
6
|
+
import { InspectOptions } from 'node:util';
|
|
7
7
|
|
|
8
8
|
global {
|
|
9
9
|
// This needs to be global to avoid TS2403 in case lib.dom.d.ts is present in the same build
|
|
@@ -29,16 +29,16 @@ declare module 'node:console' {
|
|
|
29
29
|
*/
|
|
30
30
|
countReset(label?: string): void;
|
|
31
31
|
/**
|
|
32
|
-
* The `console.debug()` function is an alias for {@link console.log}.
|
|
32
|
+
* The `console.debug()` function is an alias for {@link console.log()}.
|
|
33
33
|
*/
|
|
34
34
|
debug(message?: any, ...optionalParams: any[]): void;
|
|
35
35
|
/**
|
|
36
|
-
* Uses {@link util.inspect} on `obj` and prints the resulting string to `stdout`.
|
|
36
|
+
* Uses {@link util.inspect()} on `obj` and prints the resulting string to `stdout`.
|
|
37
37
|
* This function bypasses any custom `inspect()` function defined on `obj`.
|
|
38
38
|
*/
|
|
39
39
|
dir(obj: any, options?: InspectOptions): void;
|
|
40
40
|
/**
|
|
41
|
-
* This method calls {@link console.log} passing it the arguments received. Please note that this method does not produce any XML formatting
|
|
41
|
+
* This method calls {@link console.log()} passing it the arguments received. Please note that this method does not produce any XML formatting
|
|
42
42
|
*/
|
|
43
43
|
dirxml(...data: any[]): void;
|
|
44
44
|
/**
|
|
@@ -51,7 +51,7 @@ declare module 'node:console' {
|
|
|
51
51
|
*/
|
|
52
52
|
group(...label: any[]): void;
|
|
53
53
|
/**
|
|
54
|
-
* The `console.groupCollapsed()` function is an alias for {@link console.group}.
|
|
54
|
+
* The `console.groupCollapsed()` function is an alias for {@link console.group()}.
|
|
55
55
|
*/
|
|
56
56
|
groupCollapsed(...label: any[]): void;
|
|
57
57
|
/**
|
|
@@ -59,7 +59,7 @@ declare module 'node:console' {
|
|
|
59
59
|
*/
|
|
60
60
|
groupEnd(): void;
|
|
61
61
|
/**
|
|
62
|
-
* The {@link console.info} function is an alias for {@link console.log}.
|
|
62
|
+
* The {@link console.info()} function is an alias for {@link console.log()}.
|
|
63
63
|
*/
|
|
64
64
|
info(message?: any, ...optionalParams: any[]): void;
|
|
65
65
|
/**
|
|
@@ -76,19 +76,19 @@ declare module 'node:console' {
|
|
|
76
76
|
*/
|
|
77
77
|
time(label?: string): void;
|
|
78
78
|
/**
|
|
79
|
-
* Stops a timer that was previously started by calling {@link console.time} and prints the result to `stdout`.
|
|
79
|
+
* Stops a timer that was previously started by calling {@link console.time()} and prints the result to `stdout`.
|
|
80
80
|
*/
|
|
81
81
|
timeEnd(label?: string): void;
|
|
82
82
|
/**
|
|
83
|
-
* For a timer that was previously started by calling {@link console.time}, prints the elapsed time and other `data` arguments to `stdout`.
|
|
83
|
+
* For a timer that was previously started by calling {@link console.time()}, prints the elapsed time and other `data` arguments to `stdout`.
|
|
84
84
|
*/
|
|
85
85
|
timeLog(label?: string, ...data: any[]): void;
|
|
86
86
|
/**
|
|
87
|
-
* Prints to `stderr` the string 'Trace :', followed by the {@link util.format} formatted message and stack trace to the current position in the code.
|
|
87
|
+
* Prints to `stderr` the string 'Trace :', followed by the {@link util.format()} formatted message and stack trace to the current position in the code.
|
|
88
88
|
*/
|
|
89
89
|
trace(message?: any, ...optionalParams: any[]): void;
|
|
90
90
|
/**
|
|
91
|
-
* The {@link console.warn} function is an alias for {@link console.error}.
|
|
91
|
+
* The {@link console.warn()} function is an alias for {@link console.error()}.
|
|
92
92
|
*/
|
|
93
93
|
warn(message?: any, ...optionalParams: any[]): void;
|
|
94
94
|
|
|
@@ -115,15 +115,10 @@ declare module 'node:console' {
|
|
|
115
115
|
namespace NodeJS {
|
|
116
116
|
interface ConsoleConstructorOptions {
|
|
117
117
|
stdout: WritableStream;
|
|
118
|
-
stderr?: WritableStream
|
|
119
|
-
ignoreErrors?: boolean
|
|
120
|
-
colorMode?: boolean | 'auto'
|
|
121
|
-
inspectOptions?: InspectOptions
|
|
122
|
-
/**
|
|
123
|
-
* Set group indentation
|
|
124
|
-
* @default 2
|
|
125
|
-
*/
|
|
126
|
-
groupIndentation?: number | undefined;
|
|
118
|
+
stderr?: WritableStream;
|
|
119
|
+
ignoreErrors?: boolean;
|
|
120
|
+
colorMode?: boolean | 'auto';
|
|
121
|
+
inspectOptions?: InspectOptions;
|
|
127
122
|
}
|
|
128
123
|
|
|
129
124
|
interface ConsoleConstructor {
|
|
@@ -1,8 +1,14 @@
|
|
|
1
|
+
/** @deprecated since v6.3.0 - use constants property exposed by the relevant module instead. */
|
|
2
|
+
declare module 'node:constants' {
|
|
3
|
+
import exp = require('constants');
|
|
4
|
+
export = exp;
|
|
5
|
+
}
|
|
6
|
+
|
|
1
7
|
/** @deprecated since v6.3.0 - use constants property exposed by the relevant module instead. */
|
|
2
8
|
declare module 'constants' {
|
|
3
|
-
import { constants as osConstants, SignalConstants } from 'os';
|
|
4
|
-
import { constants as cryptoConstants } from 'crypto';
|
|
5
|
-
import { constants as fsConstants } from 'fs';
|
|
9
|
+
import { constants as osConstants, SignalConstants } from 'node:os';
|
|
10
|
+
import { constants as cryptoConstants } from 'node:crypto';
|
|
11
|
+
import { constants as fsConstants } from 'node:fs';
|
|
6
12
|
|
|
7
13
|
const exp: typeof osConstants.errno &
|
|
8
14
|
typeof osConstants.priority &
|
|
@@ -11,8 +17,3 @@ declare module 'constants' {
|
|
|
11
17
|
typeof fsConstants;
|
|
12
18
|
export = exp;
|
|
13
19
|
}
|
|
14
|
-
|
|
15
|
-
declare module 'node:constants' {
|
|
16
|
-
import constants = require('constants');
|
|
17
|
-
export = constants;
|
|
18
|
-
}
|