@types/node 12.7.0 → 12.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- node/README.md +1 -1
- node/child_process.d.ts +108 -0
- node/crypto.d.ts +4 -4
- node/package.json +2 -2
- node/readline.d.ts +1 -1
- node/tty.d.ts +2 -0
node/README.md
CHANGED
|
@@ -8,7 +8,7 @@ This package contains type definitions for Node.js (http://nodejs.org/).
|
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node
|
|
9
9
|
|
|
10
10
|
Additional Details
|
|
11
|
-
* Last updated: Tue,
|
|
11
|
+
* Last updated: Tue, 03 Sep 2019 18:47:08 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
13
|
* Global values: Buffer, NodeJS, Symbol, __dirname, __filename, clearImmediate, clearInterval, clearTimeout, console, exports, global, module, process, queueMicrotask, require, setImmediate, setInterval, setTimeout
|
|
14
14
|
|
node/child_process.d.ts
CHANGED
|
@@ -92,6 +92,24 @@ declare module "child_process" {
|
|
|
92
92
|
];
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
+
// return this object when stdio option is a tuple of 3
|
|
96
|
+
interface ChildProcessByStdio<
|
|
97
|
+
I extends null | Writable,
|
|
98
|
+
O extends null | Readable,
|
|
99
|
+
E extends null | Readable,
|
|
100
|
+
> extends ChildProcess {
|
|
101
|
+
stdin: I;
|
|
102
|
+
stdout: O;
|
|
103
|
+
stderr: E;
|
|
104
|
+
readonly stdio: [
|
|
105
|
+
I,
|
|
106
|
+
O,
|
|
107
|
+
E,
|
|
108
|
+
Readable | Writable | null | undefined, // extra, no modification
|
|
109
|
+
Readable | Writable | null | undefined // extra, no modification
|
|
110
|
+
];
|
|
111
|
+
}
|
|
112
|
+
|
|
95
113
|
interface MessageOptions {
|
|
96
114
|
keepOpen?: boolean;
|
|
97
115
|
}
|
|
@@ -128,9 +146,99 @@ declare module "child_process" {
|
|
|
128
146
|
stdio?: 'pipe' | Array<null | undefined | 'pipe'>;
|
|
129
147
|
}
|
|
130
148
|
|
|
149
|
+
type StdioNull = 'inherit' | 'ignore' | Stream;
|
|
150
|
+
type StdioPipe = undefined | null | 'pipe';
|
|
151
|
+
|
|
152
|
+
interface SpawnOptionsWithStdioTuple<
|
|
153
|
+
Stdin extends StdioNull | StdioPipe,
|
|
154
|
+
Stdout extends StdioNull | StdioPipe,
|
|
155
|
+
Stderr extends StdioNull | StdioPipe,
|
|
156
|
+
> extends SpawnOptions {
|
|
157
|
+
stdio: [Stdin, Stdout, Stderr];
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
// overloads of spawn without 'args'
|
|
131
161
|
function spawn(command: string, options?: SpawnOptionsWithoutStdio): ChildProcessWithoutNullStreams;
|
|
162
|
+
|
|
163
|
+
function spawn(
|
|
164
|
+
command: string,
|
|
165
|
+
options: SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioPipe>,
|
|
166
|
+
): ChildProcessByStdio<Writable, Readable, Readable>;
|
|
167
|
+
function spawn(
|
|
168
|
+
command: string,
|
|
169
|
+
options: SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioNull>,
|
|
170
|
+
): ChildProcessByStdio<Writable, Readable, null>;
|
|
171
|
+
function spawn(
|
|
172
|
+
command: string,
|
|
173
|
+
options: SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioPipe>,
|
|
174
|
+
): ChildProcessByStdio<Writable, null, Readable>;
|
|
175
|
+
function spawn(
|
|
176
|
+
command: string,
|
|
177
|
+
options: SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioPipe>,
|
|
178
|
+
): ChildProcessByStdio<null, Readable, Readable>;
|
|
179
|
+
function spawn(
|
|
180
|
+
command: string,
|
|
181
|
+
options: SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioNull>,
|
|
182
|
+
): ChildProcessByStdio<Writable, null, null>;
|
|
183
|
+
function spawn(
|
|
184
|
+
command: string,
|
|
185
|
+
options: SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioNull>,
|
|
186
|
+
): ChildProcessByStdio<null, Readable, null>;
|
|
187
|
+
function spawn(
|
|
188
|
+
command: string,
|
|
189
|
+
options: SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioPipe>,
|
|
190
|
+
): ChildProcessByStdio<null, null, Readable>;
|
|
191
|
+
function spawn(
|
|
192
|
+
command: string,
|
|
193
|
+
options: SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioNull>,
|
|
194
|
+
): ChildProcessByStdio<null, null, null>;
|
|
195
|
+
|
|
132
196
|
function spawn(command: string, options: SpawnOptions): ChildProcess;
|
|
197
|
+
|
|
198
|
+
// overloads of spawn with 'args'
|
|
133
199
|
function spawn(command: string, args?: ReadonlyArray<string>, options?: SpawnOptionsWithoutStdio): ChildProcessWithoutNullStreams;
|
|
200
|
+
|
|
201
|
+
function spawn(
|
|
202
|
+
command: string,
|
|
203
|
+
args: ReadonlyArray<string>,
|
|
204
|
+
options: SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioPipe>,
|
|
205
|
+
): ChildProcessByStdio<Writable, Readable, Readable>;
|
|
206
|
+
function spawn(
|
|
207
|
+
command: string,
|
|
208
|
+
args: ReadonlyArray<string>,
|
|
209
|
+
options: SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioNull>,
|
|
210
|
+
): ChildProcessByStdio<Writable, Readable, null>;
|
|
211
|
+
function spawn(
|
|
212
|
+
command: string,
|
|
213
|
+
args: ReadonlyArray<string>,
|
|
214
|
+
options: SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioPipe>,
|
|
215
|
+
): ChildProcessByStdio<Writable, null, Readable>;
|
|
216
|
+
function spawn(
|
|
217
|
+
command: string,
|
|
218
|
+
args: ReadonlyArray<string>,
|
|
219
|
+
options: SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioPipe>,
|
|
220
|
+
): ChildProcessByStdio<null, Readable, Readable>;
|
|
221
|
+
function spawn(
|
|
222
|
+
command: string,
|
|
223
|
+
args: ReadonlyArray<string>,
|
|
224
|
+
options: SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioNull>,
|
|
225
|
+
): ChildProcessByStdio<Writable, null, null>;
|
|
226
|
+
function spawn(
|
|
227
|
+
command: string,
|
|
228
|
+
args: ReadonlyArray<string>,
|
|
229
|
+
options: SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioNull>,
|
|
230
|
+
): ChildProcessByStdio<null, Readable, null>;
|
|
231
|
+
function spawn(
|
|
232
|
+
command: string,
|
|
233
|
+
args: ReadonlyArray<string>,
|
|
234
|
+
options: SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioPipe>,
|
|
235
|
+
): ChildProcessByStdio<null, null, Readable>;
|
|
236
|
+
function spawn(
|
|
237
|
+
command: string,
|
|
238
|
+
args: ReadonlyArray<string>,
|
|
239
|
+
options: SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioNull>,
|
|
240
|
+
): ChildProcessByStdio<null, null, null>;
|
|
241
|
+
|
|
134
242
|
function spawn(command: string, args: ReadonlyArray<string>, options: SpawnOptions): ChildProcess;
|
|
135
243
|
|
|
136
244
|
interface ExecOptions extends CommonOptions {
|
node/crypto.d.ts
CHANGED
|
@@ -118,14 +118,14 @@ declare module "crypto" {
|
|
|
118
118
|
type HexBase64BinaryEncoding = "binary" | "base64" | "hex";
|
|
119
119
|
type ECDHKeyFormat = "compressed" | "uncompressed" | "hybrid";
|
|
120
120
|
|
|
121
|
-
class Hash extends stream.
|
|
121
|
+
class Hash extends stream.Transform {
|
|
122
122
|
private constructor();
|
|
123
123
|
update(data: BinaryLike): Hash;
|
|
124
124
|
update(data: string, input_encoding: Utf8AsciiLatin1Encoding): Hash;
|
|
125
125
|
digest(): Buffer;
|
|
126
126
|
digest(encoding: HexBase64Latin1Encoding): string;
|
|
127
127
|
}
|
|
128
|
-
class Hmac extends stream.
|
|
128
|
+
class Hmac extends stream.Transform {
|
|
129
129
|
private constructor();
|
|
130
130
|
update(data: BinaryLike): Hmac;
|
|
131
131
|
update(data: string, input_encoding: Utf8AsciiLatin1Encoding): Hmac;
|
|
@@ -193,7 +193,7 @@ declare module "crypto" {
|
|
|
193
193
|
algorithm: string, key: CipherKey, iv: BinaryLike | null, options?: stream.TransformOptions
|
|
194
194
|
): Cipher;
|
|
195
195
|
|
|
196
|
-
class Cipher extends stream.
|
|
196
|
+
class Cipher extends stream.Transform {
|
|
197
197
|
private constructor();
|
|
198
198
|
update(data: BinaryLike): Buffer;
|
|
199
199
|
update(data: string, input_encoding: Utf8AsciiBinaryEncoding): Buffer;
|
|
@@ -234,7 +234,7 @@ declare module "crypto" {
|
|
|
234
234
|
): DecipherGCM;
|
|
235
235
|
function createDecipheriv(algorithm: string, key: BinaryLike, iv: BinaryLike | null, options?: stream.TransformOptions): Decipher;
|
|
236
236
|
|
|
237
|
-
class Decipher extends stream.
|
|
237
|
+
class Decipher extends stream.Transform {
|
|
238
238
|
private constructor();
|
|
239
239
|
update(data: Binary): Buffer;
|
|
240
240
|
update(data: string, input_encoding: HexBase64BinaryEncoding): Buffer;
|
node/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "12.7.
|
|
3
|
+
"version": "12.7.4",
|
|
4
4
|
"description": "TypeScript definitions for Node.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"contributors": [
|
|
@@ -206,6 +206,6 @@
|
|
|
206
206
|
},
|
|
207
207
|
"scripts": {},
|
|
208
208
|
"dependencies": {},
|
|
209
|
-
"typesPublisherContentHash": "
|
|
209
|
+
"typesPublisherContentHash": "4a4995fbb23f76056c0076d4f3f947572a882c78d6502633cdb5a02bf4005f58",
|
|
210
210
|
"typeScriptVersion": "2.0"
|
|
211
211
|
}
|
node/readline.d.ts
CHANGED
|
@@ -142,7 +142,7 @@ declare module "readline" {
|
|
|
142
142
|
/**
|
|
143
143
|
* Moves this WriteStream's cursor to the specified position.
|
|
144
144
|
*/
|
|
145
|
-
function cursorTo(stream: NodeJS.WritableStream, x: number, y
|
|
145
|
+
function cursorTo(stream: NodeJS.WritableStream, x: number, y?: number, callback?: () => void): boolean;
|
|
146
146
|
/**
|
|
147
147
|
* Moves this WriteStream's cursor relative to its current position.
|
|
148
148
|
*/
|
node/tty.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ declare module "tty" {
|
|
|
3
3
|
|
|
4
4
|
function isatty(fd: number): boolean;
|
|
5
5
|
class ReadStream extends net.Socket {
|
|
6
|
+
constructor(fd: number, options?: net.SocketConstructorOpts);
|
|
6
7
|
isRaw: boolean;
|
|
7
8
|
setRawMode(mode: boolean): void;
|
|
8
9
|
isTTY: boolean;
|
|
@@ -14,6 +15,7 @@ declare module "tty" {
|
|
|
14
15
|
*/
|
|
15
16
|
type Direction = -1 | 0 | 1;
|
|
16
17
|
class WriteStream extends net.Socket {
|
|
18
|
+
constructor(fd: number);
|
|
17
19
|
addListener(event: string, listener: (...args: any[]) => void): this;
|
|
18
20
|
addListener(event: "resize", listener: () => void): this;
|
|
19
21
|
|