@types/node 16.4.9 → 16.4.13
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 +2 -2
- node/cluster.d.ts +1 -1
- node/fs.d.ts +5 -5
- node/http.d.ts +72 -9
- node/https.d.ts +104 -1
- node/index.d.ts +1 -0
- node/net.d.ts +6 -0
- node/package.json +7 -2
node/README.md
CHANGED
|
@@ -8,9 +8,9 @@ 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, 06 Aug 2021 01:01:21 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
13
|
* Global values: `AbortController`, `AbortSignal`, `__dirname`, `__filename`, `console`, `exports`, `gc`, `global`, `module`, `process`, `require`
|
|
14
14
|
|
|
15
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), [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), [Yongsheng Zhang](https://github.com/ZYSzys),
|
|
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), [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), [Yongsheng Zhang](https://github.com/ZYSzys), [NodeJS Contributors](https://github.com/NodeJS), and [Linus Unnebäck](https://github.com/LinusU).
|
node/cluster.d.ts
CHANGED
|
@@ -322,7 +322,7 @@ declare module 'cluster' {
|
|
|
322
322
|
export interface Cluster extends EventEmitter {
|
|
323
323
|
disconnect(callback?: () => void): void;
|
|
324
324
|
fork(env?: any): Worker;
|
|
325
|
-
/** @deprecated since v16.0.0 - use
|
|
325
|
+
/** @deprecated since v16.0.0 - use isPrimary. */
|
|
326
326
|
readonly isMaster: boolean;
|
|
327
327
|
readonly isPrimary: boolean;
|
|
328
328
|
readonly isWorker: boolean;
|
node/fs.d.ts
CHANGED
|
@@ -2354,7 +2354,7 @@ declare module 'fs' {
|
|
|
2354
2354
|
encoding: BufferEncoding;
|
|
2355
2355
|
flag?: string | undefined;
|
|
2356
2356
|
} & Abortable)
|
|
2357
|
-
|
|
|
2357
|
+
| BufferEncoding,
|
|
2358
2358
|
callback: (err: NodeJS.ErrnoException | null, data: string) => void
|
|
2359
2359
|
): void;
|
|
2360
2360
|
/**
|
|
@@ -2370,7 +2370,7 @@ declare module 'fs' {
|
|
|
2370
2370
|
| (ObjectEncodingOptions & {
|
|
2371
2371
|
flag?: string | undefined;
|
|
2372
2372
|
} & Abortable)
|
|
2373
|
-
|
|
|
2373
|
+
| BufferEncoding
|
|
2374
2374
|
| undefined
|
|
2375
2375
|
| null,
|
|
2376
2376
|
callback: (err: NodeJS.ErrnoException | null, data: string | Buffer) => void
|
|
@@ -2411,7 +2411,7 @@ declare module 'fs' {
|
|
|
2411
2411
|
encoding: BufferEncoding;
|
|
2412
2412
|
flag?: string | undefined;
|
|
2413
2413
|
}
|
|
2414
|
-
|
|
|
2414
|
+
| BufferEncoding
|
|
2415
2415
|
): Promise<string>;
|
|
2416
2416
|
/**
|
|
2417
2417
|
* Asynchronously reads the entire contents of a file.
|
|
@@ -2427,7 +2427,7 @@ declare module 'fs' {
|
|
|
2427
2427
|
| (ObjectEncodingOptions & {
|
|
2428
2428
|
flag?: string | undefined;
|
|
2429
2429
|
})
|
|
2430
|
-
|
|
|
2430
|
+
| BufferEncoding
|
|
2431
2431
|
| null
|
|
2432
2432
|
): Promise<string | Buffer>;
|
|
2433
2433
|
}
|
|
@@ -2500,7 +2500,7 @@ declare module 'fs' {
|
|
|
2500
2500
|
mode?: Mode | undefined;
|
|
2501
2501
|
flag?: string | undefined;
|
|
2502
2502
|
})
|
|
2503
|
-
|
|
|
2503
|
+
| BufferEncoding
|
|
2504
2504
|
| null;
|
|
2505
2505
|
/**
|
|
2506
2506
|
* When `file` is a filename, asynchronously writes data to the file, replacing the
|
node/http.d.ts
CHANGED
|
@@ -156,7 +156,12 @@ declare module 'http' {
|
|
|
156
156
|
insecureHTTPParser?: boolean | undefined;
|
|
157
157
|
}
|
|
158
158
|
type RequestListener = (req: IncomingMessage, res: ServerResponse) => void;
|
|
159
|
-
|
|
159
|
+
/**
|
|
160
|
+
* @since v0.1.17
|
|
161
|
+
*/
|
|
162
|
+
class Server extends NetServer {
|
|
163
|
+
constructor(requestListener?: RequestListener);
|
|
164
|
+
constructor(options: ServerOptions, requestListener?: RequestListener);
|
|
160
165
|
setTimeout(msecs?: number, callback?: () => void): this;
|
|
161
166
|
setTimeout(callback: () => void): this;
|
|
162
167
|
/**
|
|
@@ -179,14 +184,72 @@ declare module 'http' {
|
|
|
179
184
|
* {@link https://nodejs.org/api/http.html#http_server_requesttimeout}
|
|
180
185
|
*/
|
|
181
186
|
requestTimeout: number;
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
187
|
+
addListener(event: string, listener: (...args: any[]) => void): this;
|
|
188
|
+
addListener(event: 'close', listener: () => void): this;
|
|
189
|
+
addListener(event: 'connection', listener: (socket: Socket) => void): this;
|
|
190
|
+
addListener(event: 'error', listener: (err: Error) => void): this;
|
|
191
|
+
addListener(event: 'listening', listener: () => void): this;
|
|
192
|
+
addListener(event: 'checkContinue', listener: RequestListener): this;
|
|
193
|
+
addListener(event: 'checkExpectation', listener: RequestListener): this;
|
|
194
|
+
addListener(event: 'clientError', listener: (err: Error, socket: stream.Duplex) => void): this;
|
|
195
|
+
addListener(event: 'connect', listener: (req: IncomingMessage, socket: stream.Duplex, head: Buffer) => void): this;
|
|
196
|
+
addListener(event: 'request', listener: RequestListener): this;
|
|
197
|
+
addListener(event: 'upgrade', listener: (req: IncomingMessage, socket: stream.Duplex, head: Buffer) => void): this;
|
|
198
|
+
emit(event: string, ...args: any[]): boolean;
|
|
199
|
+
emit(event: 'close'): boolean;
|
|
200
|
+
emit(event: 'connection', socket: Socket): boolean;
|
|
201
|
+
emit(event: 'error', err: Error): boolean;
|
|
202
|
+
emit(event: 'listening'): boolean;
|
|
203
|
+
emit(event: 'checkContinue', req: IncomingMessage, res: ServerResponse): boolean;
|
|
204
|
+
emit(event: 'checkExpectation', req: IncomingMessage, res: ServerResponse): boolean;
|
|
205
|
+
emit(event: 'clientError', err: Error, socket: stream.Duplex): boolean;
|
|
206
|
+
emit(event: 'connect', req: IncomingMessage, socket: stream.Duplex, head: Buffer): boolean;
|
|
207
|
+
emit(event: 'request', req: IncomingMessage, res: ServerResponse): boolean;
|
|
208
|
+
emit(event: 'upgrade', req: IncomingMessage, socket: stream.Duplex, head: Buffer): boolean;
|
|
209
|
+
on(event: string, listener: (...args: any[]) => void): this;
|
|
210
|
+
on(event: 'close', listener: () => void): this;
|
|
211
|
+
on(event: 'connection', listener: (socket: Socket) => void): this;
|
|
212
|
+
on(event: 'error', listener: (err: Error) => void): this;
|
|
213
|
+
on(event: 'listening', listener: () => void): this;
|
|
214
|
+
on(event: 'checkContinue', listener: RequestListener): this;
|
|
215
|
+
on(event: 'checkExpectation', listener: RequestListener): this;
|
|
216
|
+
on(event: 'clientError', listener: (err: Error, socket: stream.Duplex) => void): this;
|
|
217
|
+
on(event: 'connect', listener: (req: IncomingMessage, socket: stream.Duplex, head: Buffer) => void): this;
|
|
218
|
+
on(event: 'request', listener: RequestListener): this;
|
|
219
|
+
on(event: 'upgrade', listener: (req: IncomingMessage, socket: stream.Duplex, head: Buffer) => void): this;
|
|
220
|
+
once(event: string, listener: (...args: any[]) => void): this;
|
|
221
|
+
once(event: 'close', listener: () => void): this;
|
|
222
|
+
once(event: 'connection', listener: (socket: Socket) => void): this;
|
|
223
|
+
once(event: 'error', listener: (err: Error) => void): this;
|
|
224
|
+
once(event: 'listening', listener: () => void): this;
|
|
225
|
+
once(event: 'checkContinue', listener: RequestListener): this;
|
|
226
|
+
once(event: 'checkExpectation', listener: RequestListener): this;
|
|
227
|
+
once(event: 'clientError', listener: (err: Error, socket: stream.Duplex) => void): this;
|
|
228
|
+
once(event: 'connect', listener: (req: IncomingMessage, socket: stream.Duplex, head: Buffer) => void): this;
|
|
229
|
+
once(event: 'request', listener: RequestListener): this;
|
|
230
|
+
once(event: 'upgrade', listener: (req: IncomingMessage, socket: stream.Duplex, head: Buffer) => void): this;
|
|
231
|
+
prependListener(event: string, listener: (...args: any[]) => void): this;
|
|
232
|
+
prependListener(event: 'close', listener: () => void): this;
|
|
233
|
+
prependListener(event: 'connection', listener: (socket: Socket) => void): this;
|
|
234
|
+
prependListener(event: 'error', listener: (err: Error) => void): this;
|
|
235
|
+
prependListener(event: 'listening', listener: () => void): this;
|
|
236
|
+
prependListener(event: 'checkContinue', listener: RequestListener): this;
|
|
237
|
+
prependListener(event: 'checkExpectation', listener: RequestListener): this;
|
|
238
|
+
prependListener(event: 'clientError', listener: (err: Error, socket: stream.Duplex) => void): this;
|
|
239
|
+
prependListener(event: 'connect', listener: (req: IncomingMessage, socket: stream.Duplex, head: Buffer) => void): this;
|
|
240
|
+
prependListener(event: 'request', listener: RequestListener): this;
|
|
241
|
+
prependListener(event: 'upgrade', listener: (req: IncomingMessage, socket: stream.Duplex, head: Buffer) => void): this;
|
|
242
|
+
prependOnceListener(event: string, listener: (...args: any[]) => void): this;
|
|
243
|
+
prependOnceListener(event: 'close', listener: () => void): this;
|
|
244
|
+
prependOnceListener(event: 'connection', listener: (socket: Socket) => void): this;
|
|
245
|
+
prependOnceListener(event: 'error', listener: (err: Error) => void): this;
|
|
246
|
+
prependOnceListener(event: 'listening', listener: () => void): this;
|
|
247
|
+
prependOnceListener(event: 'checkContinue', listener: RequestListener): this;
|
|
248
|
+
prependOnceListener(event: 'checkExpectation', listener: RequestListener): this;
|
|
249
|
+
prependOnceListener(event: 'clientError', listener: (err: Error, socket: stream.Duplex) => void): this;
|
|
250
|
+
prependOnceListener(event: 'connect', listener: (req: IncomingMessage, socket: stream.Duplex, head: Buffer) => void): this;
|
|
251
|
+
prependOnceListener(event: 'request', listener: RequestListener): this;
|
|
252
|
+
prependOnceListener(event: 'upgrade', listener: (req: IncomingMessage, socket: stream.Duplex, head: Buffer) => void): this;
|
|
190
253
|
}
|
|
191
254
|
/**
|
|
192
255
|
* This class serves as the parent class of {@link ClientRequest} and {@link ServerResponse}. It is an abstract of outgoing message from
|
node/https.d.ts
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* @see [source](https://github.com/nodejs/node/blob/v16.4.2/lib/https.js)
|
|
5
5
|
*/
|
|
6
6
|
declare module 'https' {
|
|
7
|
+
import { Duplex } from 'node:stream';
|
|
7
8
|
import * as tls from 'node:tls';
|
|
8
9
|
import * as http from 'node:http';
|
|
9
10
|
import { URL } from 'node:url';
|
|
@@ -25,7 +26,7 @@ declare module 'https' {
|
|
|
25
26
|
constructor(options?: AgentOptions);
|
|
26
27
|
options: AgentOptions;
|
|
27
28
|
}
|
|
28
|
-
interface Server extends http.
|
|
29
|
+
interface Server extends http.Server {}
|
|
29
30
|
/**
|
|
30
31
|
* See `http.Server` for more information.
|
|
31
32
|
* @since v0.3.4
|
|
@@ -33,6 +34,108 @@ declare module 'https' {
|
|
|
33
34
|
class Server extends tls.Server {
|
|
34
35
|
constructor(requestListener?: http.RequestListener);
|
|
35
36
|
constructor(options: ServerOptions, requestListener?: http.RequestListener);
|
|
37
|
+
addListener(event: string, listener: (...args: any[]) => void): this;
|
|
38
|
+
addListener(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
|
|
39
|
+
addListener(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this;
|
|
40
|
+
addListener(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
|
|
41
|
+
addListener(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this;
|
|
42
|
+
addListener(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this;
|
|
43
|
+
addListener(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
|
|
44
|
+
addListener(event: 'close', listener: () => void): this;
|
|
45
|
+
addListener(event: 'connection', listener: (socket: Duplex) => void): this;
|
|
46
|
+
addListener(event: 'error', listener: (err: Error) => void): this;
|
|
47
|
+
addListener(event: 'listening', listener: () => void): this;
|
|
48
|
+
addListener(event: 'checkContinue', listener: http.RequestListener): this;
|
|
49
|
+
addListener(event: 'checkExpectation', listener: http.RequestListener): this;
|
|
50
|
+
addListener(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this;
|
|
51
|
+
addListener(event: 'connect', listener: (req: http.IncomingMessage, socket: Duplex, head: Buffer) => void): this;
|
|
52
|
+
addListener(event: 'request', listener: http.RequestListener): this;
|
|
53
|
+
addListener(event: 'upgrade', listener: (req: http.IncomingMessage, socket: Duplex, head: Buffer) => void): this;
|
|
54
|
+
emit(event: string, ...args: any[]): boolean;
|
|
55
|
+
emit(event: 'keylog', line: Buffer, tlsSocket: tls.TLSSocket): boolean;
|
|
56
|
+
emit(event: 'newSession', sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void): boolean;
|
|
57
|
+
emit(event: 'OCSPRequest', certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void): boolean;
|
|
58
|
+
emit(event: 'resumeSession', sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void): boolean;
|
|
59
|
+
emit(event: 'secureConnection', tlsSocket: tls.TLSSocket): boolean;
|
|
60
|
+
emit(event: 'tlsClientError', err: Error, tlsSocket: tls.TLSSocket): boolean;
|
|
61
|
+
emit(event: 'close'): boolean;
|
|
62
|
+
emit(event: 'connection', socket: Duplex): boolean;
|
|
63
|
+
emit(event: 'error', err: Error): boolean;
|
|
64
|
+
emit(event: 'listening'): boolean;
|
|
65
|
+
emit(event: 'checkContinue', req: http.IncomingMessage, res: http.ServerResponse): boolean;
|
|
66
|
+
emit(event: 'checkExpectation', req: http.IncomingMessage, res: http.ServerResponse): boolean;
|
|
67
|
+
emit(event: 'clientError', err: Error, socket: Duplex): boolean;
|
|
68
|
+
emit(event: 'connect', req: http.IncomingMessage, socket: Duplex, head: Buffer): boolean;
|
|
69
|
+
emit(event: 'request', req: http.IncomingMessage, res: http.ServerResponse): boolean;
|
|
70
|
+
emit(event: 'upgrade', req: http.IncomingMessage, socket: Duplex, head: Buffer): boolean;
|
|
71
|
+
on(event: string, listener: (...args: any[]) => void): this;
|
|
72
|
+
on(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
|
|
73
|
+
on(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this;
|
|
74
|
+
on(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
|
|
75
|
+
on(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this;
|
|
76
|
+
on(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this;
|
|
77
|
+
on(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
|
|
78
|
+
on(event: 'close', listener: () => void): this;
|
|
79
|
+
on(event: 'connection', listener: (socket: Duplex) => void): this;
|
|
80
|
+
on(event: 'error', listener: (err: Error) => void): this;
|
|
81
|
+
on(event: 'listening', listener: () => void): this;
|
|
82
|
+
on(event: 'checkContinue', listener: http.RequestListener): this;
|
|
83
|
+
on(event: 'checkExpectation', listener: http.RequestListener): this;
|
|
84
|
+
on(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this;
|
|
85
|
+
on(event: 'connect', listener: (req: http.IncomingMessage, socket: Duplex, head: Buffer) => void): this;
|
|
86
|
+
on(event: 'request', listener: http.RequestListener): this;
|
|
87
|
+
on(event: 'upgrade', listener: (req: http.IncomingMessage, socket: Duplex, head: Buffer) => void): this;
|
|
88
|
+
once(event: string, listener: (...args: any[]) => void): this;
|
|
89
|
+
once(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
|
|
90
|
+
once(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this;
|
|
91
|
+
once(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
|
|
92
|
+
once(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this;
|
|
93
|
+
once(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this;
|
|
94
|
+
once(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
|
|
95
|
+
once(event: 'close', listener: () => void): this;
|
|
96
|
+
once(event: 'connection', listener: (socket: Duplex) => void): this;
|
|
97
|
+
once(event: 'error', listener: (err: Error) => void): this;
|
|
98
|
+
once(event: 'listening', listener: () => void): this;
|
|
99
|
+
once(event: 'checkContinue', listener: http.RequestListener): this;
|
|
100
|
+
once(event: 'checkExpectation', listener: http.RequestListener): this;
|
|
101
|
+
once(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this;
|
|
102
|
+
once(event: 'connect', listener: (req: http.IncomingMessage, socket: Duplex, head: Buffer) => void): this;
|
|
103
|
+
once(event: 'request', listener: http.RequestListener): this;
|
|
104
|
+
once(event: 'upgrade', listener: (req: http.IncomingMessage, socket: Duplex, head: Buffer) => void): this;
|
|
105
|
+
prependListener(event: string, listener: (...args: any[]) => void): this;
|
|
106
|
+
prependListener(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
|
|
107
|
+
prependListener(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this;
|
|
108
|
+
prependListener(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
|
|
109
|
+
prependListener(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this;
|
|
110
|
+
prependListener(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this;
|
|
111
|
+
prependListener(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
|
|
112
|
+
prependListener(event: 'close', listener: () => void): this;
|
|
113
|
+
prependListener(event: 'connection', listener: (socket: Duplex) => void): this;
|
|
114
|
+
prependListener(event: 'error', listener: (err: Error) => void): this;
|
|
115
|
+
prependListener(event: 'listening', listener: () => void): this;
|
|
116
|
+
prependListener(event: 'checkContinue', listener: http.RequestListener): this;
|
|
117
|
+
prependListener(event: 'checkExpectation', listener: http.RequestListener): this;
|
|
118
|
+
prependListener(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this;
|
|
119
|
+
prependListener(event: 'connect', listener: (req: http.IncomingMessage, socket: Duplex, head: Buffer) => void): this;
|
|
120
|
+
prependListener(event: 'request', listener: http.RequestListener): this;
|
|
121
|
+
prependListener(event: 'upgrade', listener: (req: http.IncomingMessage, socket: Duplex, head: Buffer) => void): this;
|
|
122
|
+
prependOnceListener(event: string, listener: (...args: any[]) => void): this;
|
|
123
|
+
prependOnceListener(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
|
|
124
|
+
prependOnceListener(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this;
|
|
125
|
+
prependOnceListener(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
|
|
126
|
+
prependOnceListener(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this;
|
|
127
|
+
prependOnceListener(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this;
|
|
128
|
+
prependOnceListener(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
|
|
129
|
+
prependOnceListener(event: 'close', listener: () => void): this;
|
|
130
|
+
prependOnceListener(event: 'connection', listener: (socket: Duplex) => void): this;
|
|
131
|
+
prependOnceListener(event: 'error', listener: (err: Error) => void): this;
|
|
132
|
+
prependOnceListener(event: 'listening', listener: () => void): this;
|
|
133
|
+
prependOnceListener(event: 'checkContinue', listener: http.RequestListener): this;
|
|
134
|
+
prependOnceListener(event: 'checkExpectation', listener: http.RequestListener): this;
|
|
135
|
+
prependOnceListener(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this;
|
|
136
|
+
prependOnceListener(event: 'connect', listener: (req: http.IncomingMessage, socket: Duplex, head: Buffer) => void): this;
|
|
137
|
+
prependOnceListener(event: 'request', listener: http.RequestListener): this;
|
|
138
|
+
prependOnceListener(event: 'upgrade', listener: (req: http.IncomingMessage, socket: Duplex, head: Buffer) => void): this;
|
|
36
139
|
}
|
|
37
140
|
/**
|
|
38
141
|
* ```js
|
node/index.d.ts
CHANGED
|
@@ -42,6 +42,7 @@
|
|
|
42
42
|
// Victor Perin <https://github.com/victorperin>
|
|
43
43
|
// Yongsheng Zhang <https://github.com/ZYSzys>
|
|
44
44
|
// NodeJS Contributors <https://github.com/NodeJS>
|
|
45
|
+
// Linus Unnebäck <https://github.com/LinusU>
|
|
45
46
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
46
47
|
|
|
47
48
|
/**
|
node/net.d.ts
CHANGED
|
@@ -309,6 +309,7 @@ declare module 'net' {
|
|
|
309
309
|
addListener(event: 'end', listener: () => void): this;
|
|
310
310
|
addListener(event: 'error', listener: (err: Error) => void): this;
|
|
311
311
|
addListener(event: 'lookup', listener: (err: Error, address: string, family: string | number, host: string) => void): this;
|
|
312
|
+
addListener(event: 'ready', listener: () => void): this;
|
|
312
313
|
addListener(event: 'timeout', listener: () => void): this;
|
|
313
314
|
emit(event: string | symbol, ...args: any[]): boolean;
|
|
314
315
|
emit(event: 'close', hadError: boolean): boolean;
|
|
@@ -318,6 +319,7 @@ declare module 'net' {
|
|
|
318
319
|
emit(event: 'end'): boolean;
|
|
319
320
|
emit(event: 'error', err: Error): boolean;
|
|
320
321
|
emit(event: 'lookup', err: Error, address: string, family: string | number, host: string): boolean;
|
|
322
|
+
emit(event: 'ready'): boolean;
|
|
321
323
|
emit(event: 'timeout'): boolean;
|
|
322
324
|
on(event: string, listener: (...args: any[]) => void): this;
|
|
323
325
|
on(event: 'close', listener: (hadError: boolean) => void): this;
|
|
@@ -327,6 +329,7 @@ declare module 'net' {
|
|
|
327
329
|
on(event: 'end', listener: () => void): this;
|
|
328
330
|
on(event: 'error', listener: (err: Error) => void): this;
|
|
329
331
|
on(event: 'lookup', listener: (err: Error, address: string, family: string | number, host: string) => void): this;
|
|
332
|
+
on(event: 'ready', listener: () => void): this;
|
|
330
333
|
on(event: 'timeout', listener: () => void): this;
|
|
331
334
|
once(event: string, listener: (...args: any[]) => void): this;
|
|
332
335
|
once(event: 'close', listener: (hadError: boolean) => void): this;
|
|
@@ -336,6 +339,7 @@ declare module 'net' {
|
|
|
336
339
|
once(event: 'end', listener: () => void): this;
|
|
337
340
|
once(event: 'error', listener: (err: Error) => void): this;
|
|
338
341
|
once(event: 'lookup', listener: (err: Error, address: string, family: string | number, host: string) => void): this;
|
|
342
|
+
once(event: 'ready', listener: () => void): this;
|
|
339
343
|
once(event: 'timeout', listener: () => void): this;
|
|
340
344
|
prependListener(event: string, listener: (...args: any[]) => void): this;
|
|
341
345
|
prependListener(event: 'close', listener: (hadError: boolean) => void): this;
|
|
@@ -345,6 +349,7 @@ declare module 'net' {
|
|
|
345
349
|
prependListener(event: 'end', listener: () => void): this;
|
|
346
350
|
prependListener(event: 'error', listener: (err: Error) => void): this;
|
|
347
351
|
prependListener(event: 'lookup', listener: (err: Error, address: string, family: string | number, host: string) => void): this;
|
|
352
|
+
prependListener(event: 'ready', listener: () => void): this;
|
|
348
353
|
prependListener(event: 'timeout', listener: () => void): this;
|
|
349
354
|
prependOnceListener(event: string, listener: (...args: any[]) => void): this;
|
|
350
355
|
prependOnceListener(event: 'close', listener: (hadError: boolean) => void): this;
|
|
@@ -354,6 +359,7 @@ declare module 'net' {
|
|
|
354
359
|
prependOnceListener(event: 'end', listener: () => void): this;
|
|
355
360
|
prependOnceListener(event: 'error', listener: (err: Error) => void): this;
|
|
356
361
|
prependOnceListener(event: 'lookup', listener: (err: Error, address: string, family: string | number, host: string) => void): this;
|
|
362
|
+
prependOnceListener(event: 'ready', listener: () => void): this;
|
|
357
363
|
prependOnceListener(event: 'timeout', listener: () => void): this;
|
|
358
364
|
}
|
|
359
365
|
interface ListenOptions extends Abortable {
|
node/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "16.4.
|
|
3
|
+
"version": "16.4.13",
|
|
4
4
|
"description": "TypeScript definitions for Node.js",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
|
|
6
6
|
"license": "MIT",
|
|
@@ -214,6 +214,11 @@
|
|
|
214
214
|
"name": "NodeJS Contributors",
|
|
215
215
|
"url": "https://github.com/NodeJS",
|
|
216
216
|
"githubUsername": "NodeJS"
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
"name": "Linus Unnebäck",
|
|
220
|
+
"url": "https://github.com/LinusU",
|
|
221
|
+
"githubUsername": "LinusU"
|
|
217
222
|
}
|
|
218
223
|
],
|
|
219
224
|
"main": "",
|
|
@@ -232,6 +237,6 @@
|
|
|
232
237
|
},
|
|
233
238
|
"scripts": {},
|
|
234
239
|
"dependencies": {},
|
|
235
|
-
"typesPublisherContentHash": "
|
|
240
|
+
"typesPublisherContentHash": "3cc1cc7b463ea7699af2a41aa02b468332e3b95e3f6bc5418e1a3039cab60c8c",
|
|
236
241
|
"typeScriptVersion": "3.6"
|
|
237
242
|
}
|