@types/node 12.6.9 → 12.7.3
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/crypto.d.ts +4 -4
- node/dns.d.ts +3 -3
- node/http.d.ts +91 -0
- node/index.d.ts +1 -1
- node/inspector.d.ts +1469 -1692
- node/package.json +2 -2
- node/readline.d.ts +19 -5
- node/tty.d.ts +18 -3
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:
|
|
11
|
+
* Last updated: Fri, 30 Aug 2019 05:19:10 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/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/dns.d.ts
CHANGED
|
@@ -31,9 +31,9 @@ declare module "dns" {
|
|
|
31
31
|
|
|
32
32
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
33
33
|
namespace lookup {
|
|
34
|
-
function __promisify__(hostname: string, options: LookupAllOptions): Promise<
|
|
35
|
-
function __promisify__(hostname: string, options?: LookupOneOptions | number): Promise<
|
|
36
|
-
function __promisify__(hostname: string, options
|
|
34
|
+
function __promisify__(hostname: string, options: LookupAllOptions): Promise<LookupAddress[]>;
|
|
35
|
+
function __promisify__(hostname: string, options?: LookupOneOptions | number): Promise<LookupAddress>;
|
|
36
|
+
function __promisify__(hostname: string, options: LookupOptions): Promise<LookupAddress | LookupAddress[]>;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
function lookupService(address: string, port: number, callback: (err: NodeJS.ErrnoException | null, hostname: string, service: string) => void): void;
|
node/http.d.ts
CHANGED
|
@@ -146,6 +146,7 @@ declare module "http" {
|
|
|
146
146
|
class ServerResponse extends OutgoingMessage {
|
|
147
147
|
statusCode: number;
|
|
148
148
|
statusMessage: string;
|
|
149
|
+
writableFinished: boolean;
|
|
149
150
|
|
|
150
151
|
constructor(req: IncomingMessage);
|
|
151
152
|
|
|
@@ -158,6 +159,16 @@ declare module "http" {
|
|
|
158
159
|
writeHead(statusCode: number, headers?: OutgoingHttpHeaders): this;
|
|
159
160
|
}
|
|
160
161
|
|
|
162
|
+
interface InformationEvent {
|
|
163
|
+
statusCode: number;
|
|
164
|
+
statusMessage: string;
|
|
165
|
+
httpVersion: string;
|
|
166
|
+
httpVersionMajor: number;
|
|
167
|
+
httpVersionMinor: number;
|
|
168
|
+
headers: IncomingHttpHeaders;
|
|
169
|
+
rawHeaders: string[];
|
|
170
|
+
}
|
|
171
|
+
|
|
161
172
|
// https://github.com/nodejs/node/blob/master/lib/_http_client.js#L77
|
|
162
173
|
class ClientRequest extends OutgoingMessage {
|
|
163
174
|
connection: Socket;
|
|
@@ -172,6 +183,86 @@ declare module "http" {
|
|
|
172
183
|
setTimeout(timeout: number, callback?: () => void): this;
|
|
173
184
|
setNoDelay(noDelay?: boolean): void;
|
|
174
185
|
setSocketKeepAlive(enable?: boolean, initialDelay?: number): void;
|
|
186
|
+
|
|
187
|
+
addListener(event: 'abort', listener: () => void): this;
|
|
188
|
+
addListener(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
|
|
189
|
+
addListener(event: 'continue', listener: () => void): this;
|
|
190
|
+
addListener(event: 'information', listener: (info: InformationEvent) => void): this;
|
|
191
|
+
addListener(event: 'response', listener: (response: IncomingMessage) => void): this;
|
|
192
|
+
addListener(event: 'socket', listener: (socket: Socket) => void): this;
|
|
193
|
+
addListener(event: 'timeout', listener: () => void): this;
|
|
194
|
+
addListener(event: 'upgrade', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
|
|
195
|
+
addListener(event: 'close', listener: () => void): this;
|
|
196
|
+
addListener(event: 'drain', listener: () => void): this;
|
|
197
|
+
addListener(event: 'error', listener: (err: Error) => void): this;
|
|
198
|
+
addListener(event: 'finish', listener: () => void): this;
|
|
199
|
+
addListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
|
|
200
|
+
addListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
|
|
201
|
+
addListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
202
|
+
|
|
203
|
+
on(event: 'abort', listener: () => void): this;
|
|
204
|
+
on(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
|
|
205
|
+
on(event: 'continue', listener: () => void): this;
|
|
206
|
+
on(event: 'information', listener: (info: InformationEvent) => void): this;
|
|
207
|
+
on(event: 'response', listener: (response: IncomingMessage) => void): this;
|
|
208
|
+
on(event: 'socket', listener: (socket: Socket) => void): this;
|
|
209
|
+
on(event: 'timeout', listener: () => void): this;
|
|
210
|
+
on(event: 'upgrade', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
|
|
211
|
+
on(event: 'close', listener: () => void): this;
|
|
212
|
+
on(event: 'drain', listener: () => void): this;
|
|
213
|
+
on(event: 'error', listener: (err: Error) => void): this;
|
|
214
|
+
on(event: 'finish', listener: () => void): this;
|
|
215
|
+
on(event: 'pipe', listener: (src: stream.Readable) => void): this;
|
|
216
|
+
on(event: 'unpipe', listener: (src: stream.Readable) => void): this;
|
|
217
|
+
on(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
218
|
+
|
|
219
|
+
once(event: 'abort', listener: () => void): this;
|
|
220
|
+
once(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
|
|
221
|
+
once(event: 'continue', listener: () => void): this;
|
|
222
|
+
once(event: 'information', listener: (info: InformationEvent) => void): this;
|
|
223
|
+
once(event: 'response', listener: (response: IncomingMessage) => void): this;
|
|
224
|
+
once(event: 'socket', listener: (socket: Socket) => void): this;
|
|
225
|
+
once(event: 'timeout', listener: () => void): this;
|
|
226
|
+
once(event: 'upgrade', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
|
|
227
|
+
once(event: 'close', listener: () => void): this;
|
|
228
|
+
once(event: 'drain', listener: () => void): this;
|
|
229
|
+
once(event: 'error', listener: (err: Error) => void): this;
|
|
230
|
+
once(event: 'finish', listener: () => void): this;
|
|
231
|
+
once(event: 'pipe', listener: (src: stream.Readable) => void): this;
|
|
232
|
+
once(event: 'unpipe', listener: (src: stream.Readable) => void): this;
|
|
233
|
+
once(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
234
|
+
|
|
235
|
+
prependListener(event: 'abort', listener: () => void): this;
|
|
236
|
+
prependListener(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
|
|
237
|
+
prependListener(event: 'continue', listener: () => void): this;
|
|
238
|
+
prependListener(event: 'information', listener: (info: InformationEvent) => void): this;
|
|
239
|
+
prependListener(event: 'response', listener: (response: IncomingMessage) => void): this;
|
|
240
|
+
prependListener(event: 'socket', listener: (socket: Socket) => void): this;
|
|
241
|
+
prependListener(event: 'timeout', listener: () => void): this;
|
|
242
|
+
prependListener(event: 'upgrade', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
|
|
243
|
+
prependListener(event: 'close', listener: () => void): this;
|
|
244
|
+
prependListener(event: 'drain', listener: () => void): this;
|
|
245
|
+
prependListener(event: 'error', listener: (err: Error) => void): this;
|
|
246
|
+
prependListener(event: 'finish', listener: () => void): this;
|
|
247
|
+
prependListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
|
|
248
|
+
prependListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
|
|
249
|
+
prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
250
|
+
|
|
251
|
+
prependOnceListener(event: 'abort', listener: () => void): this;
|
|
252
|
+
prependOnceListener(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
|
|
253
|
+
prependOnceListener(event: 'continue', listener: () => void): this;
|
|
254
|
+
prependOnceListener(event: 'information', listener: (info: InformationEvent) => void): this;
|
|
255
|
+
prependOnceListener(event: 'response', listener: (response: IncomingMessage) => void): this;
|
|
256
|
+
prependOnceListener(event: 'socket', listener: (socket: Socket) => void): this;
|
|
257
|
+
prependOnceListener(event: 'timeout', listener: () => void): this;
|
|
258
|
+
prependOnceListener(event: 'upgrade', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
|
|
259
|
+
prependOnceListener(event: 'close', listener: () => void): this;
|
|
260
|
+
prependOnceListener(event: 'drain', listener: () => void): this;
|
|
261
|
+
prependOnceListener(event: 'error', listener: (err: Error) => void): this;
|
|
262
|
+
prependOnceListener(event: 'finish', listener: () => void): this;
|
|
263
|
+
prependOnceListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
|
|
264
|
+
prependOnceListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
|
|
265
|
+
prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
175
266
|
}
|
|
176
267
|
|
|
177
268
|
class IncomingMessage extends stream.Readable {
|
node/index.d.ts
CHANGED