@types/node 14.18.62 → 14.18.63
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/README.md +1 -1
- node v14.18/assert.d.ts +33 -31
- node v14.18/async_hooks.d.ts +27 -20
- node v14.18/buffer.d.ts +4 -4
- node v14.18/child_process.d.ts +191 -62
- node v14.18/cluster.d.ts +59 -28
- node v14.18/console.d.ts +6 -6
- node v14.18/constants.d.ts +12 -11
- node v14.18/crypto.d.ts +232 -228
- node v14.18/dgram.d.ts +50 -14
- node v14.18/dns.d.ts +183 -54
- node v14.18/domain.d.ts +4 -4
- node v14.18/events.d.ts +4 -4
- node v14.18/fs/promises.d.ts +87 -25
- node v14.18/fs.d.ts +404 -104
- node v14.18/globals.d.ts +33 -16
- node v14.18/http.d.ts +201 -201
- node v14.18/http2.d.ts +340 -93
- node v14.18/https.d.ts +107 -105
- node v14.18/module.d.ts +4 -4
- node v14.18/net.d.ts +27 -12
- node v14.18/os.d.ts +4 -4
- node v14.18/package.json +2 -2
- node v14.18/path.d.ts +5 -5
- node v14.18/perf_hooks.d.ts +5 -5
- node v14.18/process.d.ts +61 -22
- node v14.18/punycode.d.ts +3 -3
- node v14.18/querystring.d.ts +15 -5
- node v14.18/readline.d.ts +16 -6
- node v14.18/repl.d.ts +13 -7
- node v14.18/stream.d.ts +160 -100
- node v14.18/string_decoder.d.ts +3 -3
- node v14.18/timers.d.ts +3 -3
- node v14.18/tls.d.ts +109 -27
- node v14.18/trace_events.d.ts +3 -3
- node v14.18/ts4.8/assert.d.ts +33 -31
- node v14.18/ts4.8/async_hooks.d.ts +27 -20
- node v14.18/ts4.8/buffer.d.ts +4 -4
- node v14.18/ts4.8/child_process.d.ts +191 -62
- node v14.18/ts4.8/cluster.d.ts +59 -28
- node v14.18/ts4.8/console.d.ts +6 -6
- node v14.18/ts4.8/constants.d.ts +12 -11
- node v14.18/ts4.8/crypto.d.ts +232 -228
- node v14.18/ts4.8/dgram.d.ts +50 -14
- node v14.18/ts4.8/dns.d.ts +183 -54
- node v14.18/ts4.8/domain.d.ts +4 -4
- node v14.18/ts4.8/events.d.ts +4 -4
- node v14.18/ts4.8/fs/promises.d.ts +87 -25
- node v14.18/ts4.8/fs.d.ts +404 -104
- node v14.18/ts4.8/globals.d.ts +33 -16
- node v14.18/ts4.8/http.d.ts +200 -200
- node v14.18/ts4.8/http2.d.ts +340 -93
- node v14.18/ts4.8/https.d.ts +107 -105
- node v14.18/ts4.8/module.d.ts +4 -4
- node v14.18/ts4.8/net.d.ts +27 -12
- node v14.18/ts4.8/os.d.ts +4 -4
- node v14.18/ts4.8/path.d.ts +5 -5
- node v14.18/ts4.8/perf_hooks.d.ts +5 -5
- node v14.18/ts4.8/process.d.ts +61 -22
- node v14.18/ts4.8/punycode.d.ts +3 -3
- node v14.18/ts4.8/querystring.d.ts +15 -5
- node v14.18/ts4.8/readline.d.ts +16 -6
- node v14.18/ts4.8/repl.d.ts +13 -7
- node v14.18/ts4.8/stream.d.ts +160 -100
- node v14.18/ts4.8/string_decoder.d.ts +3 -3
- node v14.18/ts4.8/timers.d.ts +3 -3
- node v14.18/ts4.8/tls.d.ts +109 -27
- node v14.18/ts4.8/trace_events.d.ts +3 -3
- node v14.18/ts4.8/tty.d.ts +4 -4
- node v14.18/ts4.8/url.d.ts +21 -12
- node v14.18/ts4.8/util.d.ts +102 -40
- node v14.18/ts4.8/v8.d.ts +4 -5
- node v14.18/ts4.8/vm.d.ts +7 -7
- node v14.18/ts4.8/wasi.d.ts +3 -4
- node v14.18/ts4.8/worker_threads.d.ts +8 -8
- node v14.18/ts4.8/zlib.d.ts +13 -13
- node v14.18/tty.d.ts +4 -4
- node v14.18/url.d.ts +21 -12
- node v14.18/util.d.ts +102 -40
- node v14.18/v8.d.ts +4 -5
- node v14.18/vm.d.ts +7 -7
- node v14.18/wasi.d.ts +3 -4
- node v14.18/worker_threads.d.ts +8 -8
- node v14.18/zlib.d.ts +13 -13
node v14.18/tls.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
declare module
|
|
2
|
-
import * as net from
|
|
3
|
-
import * as stream from
|
|
1
|
+
declare module "tls" {
|
|
2
|
+
import * as net from "net";
|
|
3
|
+
import * as stream from "stream";
|
|
4
4
|
|
|
5
5
|
const CLIENT_RENEG_LIMIT: number;
|
|
6
6
|
const CLIENT_RENEG_WINDOW: number;
|
|
@@ -266,7 +266,10 @@ declare module 'tls' {
|
|
|
266
266
|
* is successfully completed.
|
|
267
267
|
* @return `undefined` when socket is destroy, `false` if negotiaion can't be initiated.
|
|
268
268
|
*/
|
|
269
|
-
renegotiate(
|
|
269
|
+
renegotiate(
|
|
270
|
+
options: { rejectUnauthorized?: boolean | undefined; requestCert?: boolean | undefined },
|
|
271
|
+
callback: (err: Error | null) => void,
|
|
272
|
+
): undefined | boolean;
|
|
270
273
|
/**
|
|
271
274
|
* Set maximum TLS fragment size (default and maximum value is: 16384, minimum is: 512).
|
|
272
275
|
* Smaller fragment size decreases buffering latency on the client: large fragments are buffered by
|
|
@@ -404,7 +407,6 @@ declare module 'tls' {
|
|
|
404
407
|
ticketKeys?: Buffer | undefined;
|
|
405
408
|
|
|
406
409
|
/**
|
|
407
|
-
*
|
|
408
410
|
* @param socket
|
|
409
411
|
* @param identity identity parameter sent from the client.
|
|
410
412
|
* @return pre-shared key that must either be
|
|
@@ -484,7 +486,6 @@ declare module 'tls' {
|
|
|
484
486
|
*/
|
|
485
487
|
getTicketKeys(): Buffer;
|
|
486
488
|
/**
|
|
487
|
-
*
|
|
488
489
|
* The server.setSecureContext() method replaces the
|
|
489
490
|
* secure context of an existing server. Existing connections to the
|
|
490
491
|
* server are not interrupted.
|
|
@@ -508,49 +509,120 @@ declare module 'tls' {
|
|
|
508
509
|
*/
|
|
509
510
|
addListener(event: string, listener: (...args: any[]) => void): this;
|
|
510
511
|
addListener(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this;
|
|
511
|
-
addListener(
|
|
512
|
-
|
|
513
|
-
|
|
512
|
+
addListener(
|
|
513
|
+
event: "newSession",
|
|
514
|
+
listener: (sessionId: Buffer, sessionData: Buffer, callback: () => void) => void,
|
|
515
|
+
): this;
|
|
516
|
+
addListener(
|
|
517
|
+
event: "OCSPRequest",
|
|
518
|
+
listener: (
|
|
519
|
+
certificate: Buffer,
|
|
520
|
+
issuer: Buffer,
|
|
521
|
+
callback: (err: Error | null, resp: Buffer) => void,
|
|
522
|
+
) => void,
|
|
523
|
+
): this;
|
|
524
|
+
addListener(
|
|
525
|
+
event: "resumeSession",
|
|
526
|
+
listener: (sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void) => void,
|
|
527
|
+
): this;
|
|
514
528
|
addListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this;
|
|
515
529
|
addListener(event: "keylog", listener: (line: Buffer, tlsSocket: TLSSocket) => void): this;
|
|
516
530
|
|
|
517
531
|
emit(event: string | symbol, ...args: any[]): boolean;
|
|
518
532
|
emit(event: "tlsClientError", err: Error, tlsSocket: TLSSocket): boolean;
|
|
519
533
|
emit(event: "newSession", sessionId: Buffer, sessionData: Buffer, callback: () => void): boolean;
|
|
520
|
-
emit(
|
|
521
|
-
|
|
534
|
+
emit(
|
|
535
|
+
event: "OCSPRequest",
|
|
536
|
+
certificate: Buffer,
|
|
537
|
+
issuer: Buffer,
|
|
538
|
+
callback: (err: Error | null, resp: Buffer) => void,
|
|
539
|
+
): boolean;
|
|
540
|
+
emit(
|
|
541
|
+
event: "resumeSession",
|
|
542
|
+
sessionId: Buffer,
|
|
543
|
+
callback: (err: Error | null, sessionData: Buffer | null) => void,
|
|
544
|
+
): boolean;
|
|
522
545
|
emit(event: "secureConnection", tlsSocket: TLSSocket): boolean;
|
|
523
546
|
emit(event: "keylog", line: Buffer, tlsSocket: TLSSocket): boolean;
|
|
524
547
|
|
|
525
548
|
on(event: string, listener: (...args: any[]) => void): this;
|
|
526
549
|
on(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this;
|
|
527
550
|
on(event: "newSession", listener: (sessionId: Buffer, sessionData: Buffer, callback: () => void) => void): this;
|
|
528
|
-
on(
|
|
529
|
-
|
|
551
|
+
on(
|
|
552
|
+
event: "OCSPRequest",
|
|
553
|
+
listener: (
|
|
554
|
+
certificate: Buffer,
|
|
555
|
+
issuer: Buffer,
|
|
556
|
+
callback: (err: Error | null, resp: Buffer) => void,
|
|
557
|
+
) => void,
|
|
558
|
+
): this;
|
|
559
|
+
on(
|
|
560
|
+
event: "resumeSession",
|
|
561
|
+
listener: (sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void) => void,
|
|
562
|
+
): this;
|
|
530
563
|
on(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this;
|
|
531
564
|
on(event: "keylog", listener: (line: Buffer, tlsSocket: TLSSocket) => void): this;
|
|
532
565
|
|
|
533
566
|
once(event: string, listener: (...args: any[]) => void): this;
|
|
534
567
|
once(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this;
|
|
535
|
-
once(
|
|
536
|
-
|
|
537
|
-
|
|
568
|
+
once(
|
|
569
|
+
event: "newSession",
|
|
570
|
+
listener: (sessionId: Buffer, sessionData: Buffer, callback: () => void) => void,
|
|
571
|
+
): this;
|
|
572
|
+
once(
|
|
573
|
+
event: "OCSPRequest",
|
|
574
|
+
listener: (
|
|
575
|
+
certificate: Buffer,
|
|
576
|
+
issuer: Buffer,
|
|
577
|
+
callback: (err: Error | null, resp: Buffer) => void,
|
|
578
|
+
) => void,
|
|
579
|
+
): this;
|
|
580
|
+
once(
|
|
581
|
+
event: "resumeSession",
|
|
582
|
+
listener: (sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void) => void,
|
|
583
|
+
): this;
|
|
538
584
|
once(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this;
|
|
539
585
|
once(event: "keylog", listener: (line: Buffer, tlsSocket: TLSSocket) => void): this;
|
|
540
586
|
|
|
541
587
|
prependListener(event: string, listener: (...args: any[]) => void): this;
|
|
542
588
|
prependListener(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this;
|
|
543
|
-
prependListener(
|
|
544
|
-
|
|
545
|
-
|
|
589
|
+
prependListener(
|
|
590
|
+
event: "newSession",
|
|
591
|
+
listener: (sessionId: Buffer, sessionData: Buffer, callback: () => void) => void,
|
|
592
|
+
): this;
|
|
593
|
+
prependListener(
|
|
594
|
+
event: "OCSPRequest",
|
|
595
|
+
listener: (
|
|
596
|
+
certificate: Buffer,
|
|
597
|
+
issuer: Buffer,
|
|
598
|
+
callback: (err: Error | null, resp: Buffer) => void,
|
|
599
|
+
) => void,
|
|
600
|
+
): this;
|
|
601
|
+
prependListener(
|
|
602
|
+
event: "resumeSession",
|
|
603
|
+
listener: (sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void) => void,
|
|
604
|
+
): this;
|
|
546
605
|
prependListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this;
|
|
547
606
|
prependListener(event: "keylog", listener: (line: Buffer, tlsSocket: TLSSocket) => void): this;
|
|
548
607
|
|
|
549
608
|
prependOnceListener(event: string, listener: (...args: any[]) => void): this;
|
|
550
609
|
prependOnceListener(event: "tlsClientError", listener: (err: Error, tlsSocket: TLSSocket) => void): this;
|
|
551
|
-
prependOnceListener(
|
|
552
|
-
|
|
553
|
-
|
|
610
|
+
prependOnceListener(
|
|
611
|
+
event: "newSession",
|
|
612
|
+
listener: (sessionId: Buffer, sessionData: Buffer, callback: () => void) => void,
|
|
613
|
+
): this;
|
|
614
|
+
prependOnceListener(
|
|
615
|
+
event: "OCSPRequest",
|
|
616
|
+
listener: (
|
|
617
|
+
certificate: Buffer,
|
|
618
|
+
issuer: Buffer,
|
|
619
|
+
callback: (err: Error | null, resp: Buffer) => void,
|
|
620
|
+
) => void,
|
|
621
|
+
): this;
|
|
622
|
+
prependOnceListener(
|
|
623
|
+
event: "resumeSession",
|
|
624
|
+
listener: (sessionId: Buffer, callback: (err: Error | null, sessionData: Buffer | null) => void) => void,
|
|
625
|
+
): this;
|
|
554
626
|
prependOnceListener(event: "secureConnection", listener: (tlsSocket: TLSSocket) => void): this;
|
|
555
627
|
prependOnceListener(event: "keylog", listener: (line: Buffer, tlsSocket: TLSSocket) => void): this;
|
|
556
628
|
}
|
|
@@ -560,7 +632,7 @@ declare module 'tls' {
|
|
|
560
632
|
cleartext: TLSSocket;
|
|
561
633
|
}
|
|
562
634
|
|
|
563
|
-
type SecureVersion =
|
|
635
|
+
type SecureVersion = "TLSv1.3" | "TLSv1.2" | "TLSv1.1" | "TLSv1";
|
|
564
636
|
|
|
565
637
|
interface SecureContextOptions {
|
|
566
638
|
/**
|
|
@@ -736,12 +808,22 @@ declare module 'tls' {
|
|
|
736
808
|
function createServer(secureConnectionListener?: (socket: TLSSocket) => void): Server;
|
|
737
809
|
function createServer(options: TlsOptions, secureConnectionListener?: (socket: TLSSocket) => void): Server;
|
|
738
810
|
function connect(options: ConnectionOptions, secureConnectListener?: () => void): TLSSocket;
|
|
739
|
-
function connect(
|
|
811
|
+
function connect(
|
|
812
|
+
port: number,
|
|
813
|
+
host?: string,
|
|
814
|
+
options?: ConnectionOptions,
|
|
815
|
+
secureConnectListener?: () => void,
|
|
816
|
+
): TLSSocket;
|
|
740
817
|
function connect(port: number, options?: ConnectionOptions, secureConnectListener?: () => void): TLSSocket;
|
|
741
818
|
/**
|
|
742
819
|
* @deprecated since v0.11.3 Use `tls.TLSSocket` instead.
|
|
743
820
|
*/
|
|
744
|
-
function createSecurePair(
|
|
821
|
+
function createSecurePair(
|
|
822
|
+
credentials?: SecureContext,
|
|
823
|
+
isServer?: boolean,
|
|
824
|
+
requestCert?: boolean,
|
|
825
|
+
rejectUnauthorized?: boolean,
|
|
826
|
+
): SecurePair;
|
|
745
827
|
function createSecureContext(options?: SecureContextOptions): SecureContext;
|
|
746
828
|
function getCiphers(): string[];
|
|
747
829
|
|
|
@@ -779,6 +861,6 @@ declare module 'tls' {
|
|
|
779
861
|
*/
|
|
780
862
|
const rootCertificates: ReadonlyArray<string>;
|
|
781
863
|
}
|
|
782
|
-
declare module
|
|
783
|
-
export * from
|
|
864
|
+
declare module "node:tls" {
|
|
865
|
+
export * from "tls";
|
|
784
866
|
}
|
node v14.18/trace_events.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare module
|
|
1
|
+
declare module "trace_events" {
|
|
2
2
|
/**
|
|
3
3
|
* The `Tracing` object is used to enable or disable tracing for sets of
|
|
4
4
|
* categories. Instances are created using the
|
|
@@ -59,6 +59,6 @@ declare module 'trace_events' {
|
|
|
59
59
|
*/
|
|
60
60
|
function getEnabledCategories(): string | undefined;
|
|
61
61
|
}
|
|
62
|
-
declare module
|
|
63
|
-
export * from
|
|
62
|
+
declare module "node:trace_events" {
|
|
63
|
+
export * from "trace_events";
|
|
64
64
|
}
|
node v14.18/ts4.8/assert.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare module
|
|
1
|
+
declare module "assert" {
|
|
2
2
|
/** An alias of `assert.ok()`. */
|
|
3
3
|
function assert(value: any, message?: string | Error): asserts value;
|
|
4
4
|
namespace assert {
|
|
@@ -7,7 +7,7 @@ declare module 'assert' {
|
|
|
7
7
|
expected: any;
|
|
8
8
|
operator: string;
|
|
9
9
|
generatedMessage: boolean;
|
|
10
|
-
code:
|
|
10
|
+
code: "ERR_ASSERTION";
|
|
11
11
|
|
|
12
12
|
constructor(options?: {
|
|
13
13
|
/** If provided, the error message is set to this value. */
|
|
@@ -42,7 +42,7 @@ declare module 'assert' {
|
|
|
42
42
|
stack: object;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
type AssertPredicate = RegExp | (new
|
|
45
|
+
type AssertPredicate = RegExp | (new() => object) | ((thrown: any) => boolean) | object | Error;
|
|
46
46
|
|
|
47
47
|
function fail(message?: string | Error): never;
|
|
48
48
|
/** @deprecated since v10.0.0 - use fail([message]) or other assert functions instead. */
|
|
@@ -91,38 +91,40 @@ declare module 'assert' {
|
|
|
91
91
|
function match(value: string, regExp: RegExp, message?: string | Error): void;
|
|
92
92
|
function doesNotMatch(value: string, regExp: RegExp, message?: string | Error): void;
|
|
93
93
|
|
|
94
|
-
const strict:
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
94
|
+
const strict:
|
|
95
|
+
& Omit<
|
|
96
|
+
typeof assert,
|
|
97
|
+
| "equal"
|
|
98
|
+
| "notEqual"
|
|
99
|
+
| "deepEqual"
|
|
100
|
+
| "notDeepEqual"
|
|
101
|
+
| "ok"
|
|
102
|
+
| "strictEqual"
|
|
103
|
+
| "deepStrictEqual"
|
|
104
|
+
| "ifError"
|
|
105
|
+
| "strict"
|
|
106
|
+
>
|
|
107
|
+
& {
|
|
108
|
+
(value: any, message?: string | Error): asserts value;
|
|
109
|
+
equal: typeof strictEqual;
|
|
110
|
+
notEqual: typeof notStrictEqual;
|
|
111
|
+
deepEqual: typeof deepStrictEqual;
|
|
112
|
+
notDeepEqual: typeof notDeepStrictEqual;
|
|
111
113
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
114
|
+
// Mapped types and assertion functions are incompatible?
|
|
115
|
+
// TS2775: Assertions require every name in the call target
|
|
116
|
+
// to be declared with an explicit type annotation.
|
|
117
|
+
ok: typeof ok;
|
|
118
|
+
strictEqual: typeof strictEqual;
|
|
119
|
+
deepStrictEqual: typeof deepStrictEqual;
|
|
120
|
+
ifError: typeof ifError;
|
|
121
|
+
strict: typeof strict;
|
|
122
|
+
};
|
|
121
123
|
}
|
|
122
124
|
|
|
123
125
|
export = assert;
|
|
124
126
|
}
|
|
125
|
-
declare module
|
|
126
|
-
import assert = require(
|
|
127
|
+
declare module "node:assert" {
|
|
128
|
+
import assert = require("assert");
|
|
127
129
|
export = assert;
|
|
128
130
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Async Hooks module: https://nodejs.org/api/async_hooks.html
|
|
3
3
|
*/
|
|
4
|
-
declare module
|
|
4
|
+
declare module "async_hooks" {
|
|
5
5
|
/**
|
|
6
6
|
* Returns the asyncId of the current execution context.
|
|
7
7
|
*/
|
|
@@ -83,20 +83,20 @@ declare module 'async_hooks' {
|
|
|
83
83
|
function createHook(options: HookCallbacks): AsyncHook;
|
|
84
84
|
|
|
85
85
|
interface AsyncResourceOptions {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
86
|
+
/**
|
|
87
|
+
* The ID of the execution context that created this async event.
|
|
88
|
+
* @default executionAsyncId()
|
|
89
|
+
*/
|
|
90
|
+
triggerAsyncId?: number | undefined;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Disables automatic `emitDestroy` when the object is garbage collected.
|
|
94
|
+
* This usually does not need to be set (even if `emitDestroy` is called
|
|
95
|
+
* manually), unless the resource's `asyncId` is retrieved and the
|
|
96
|
+
* sensitive API's `emitDestroy` is called with it.
|
|
97
|
+
* @default false
|
|
98
|
+
*/
|
|
99
|
+
requireManualDestroy?: boolean | undefined;
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
/**
|
|
@@ -113,14 +113,17 @@ declare module 'async_hooks' {
|
|
|
113
113
|
* this async event (default: `executionAsyncId()`), or an
|
|
114
114
|
* AsyncResourceOptions object (since v9.3.0)
|
|
115
115
|
*/
|
|
116
|
-
constructor(type: string, triggerAsyncId?: number|AsyncResourceOptions);
|
|
116
|
+
constructor(type: string, triggerAsyncId?: number | AsyncResourceOptions);
|
|
117
117
|
|
|
118
118
|
/**
|
|
119
119
|
* Binds the given function to the current execution context.
|
|
120
120
|
* @param fn The function to bind to the current execution context.
|
|
121
121
|
* @param type An optional name to associate with the underlying `AsyncResource`.
|
|
122
122
|
*/
|
|
123
|
-
static bind<Func extends (...args: any[]) => any>(
|
|
123
|
+
static bind<Func extends (...args: any[]) => any>(
|
|
124
|
+
fn: Func,
|
|
125
|
+
type?: string,
|
|
126
|
+
): Func & { asyncResource: AsyncResource };
|
|
124
127
|
|
|
125
128
|
/**
|
|
126
129
|
* Binds the given function to execute to this `AsyncResource`'s scope.
|
|
@@ -139,7 +142,11 @@ declare module 'async_hooks' {
|
|
|
139
142
|
* @param thisArg The receiver to be used for the function call.
|
|
140
143
|
* @param args Optional arguments to pass to the function.
|
|
141
144
|
*/
|
|
142
|
-
runInAsyncScope<This, Result>(
|
|
145
|
+
runInAsyncScope<This, Result>(
|
|
146
|
+
fn: (this: This, ...args: any[]) => Result,
|
|
147
|
+
thisArg?: This,
|
|
148
|
+
...args: any[]
|
|
149
|
+
): Result;
|
|
143
150
|
|
|
144
151
|
/**
|
|
145
152
|
* Call AsyncHooks destroy callbacks.
|
|
@@ -225,6 +232,6 @@ declare module 'async_hooks' {
|
|
|
225
232
|
enterWith(store: T): void;
|
|
226
233
|
}
|
|
227
234
|
}
|
|
228
|
-
declare module
|
|
229
|
-
export * from
|
|
235
|
+
declare module "node:async_hooks" {
|
|
236
|
+
export * from "async_hooks";
|
|
230
237
|
}
|
node v14.18/ts4.8/buffer.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
declare module
|
|
2
|
-
import { BinaryLike } from
|
|
1
|
+
declare module "buffer" {
|
|
2
|
+
import { BinaryLike } from "node:crypto";
|
|
3
3
|
export const INSPECT_MAX_BYTES: number;
|
|
4
4
|
export const kMaxLength: number;
|
|
5
5
|
export const kStringMaxLength: number;
|
|
@@ -84,6 +84,6 @@ declare module 'buffer' {
|
|
|
84
84
|
|
|
85
85
|
export { BuffType as Buffer };
|
|
86
86
|
}
|
|
87
|
-
declare module
|
|
88
|
-
export * from
|
|
87
|
+
declare module "node:buffer" {
|
|
88
|
+
export * from "buffer";
|
|
89
89
|
}
|