@types/node 14.11.6 → 14.11.10
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 +10 -6
- node/console.d.ts +1 -1
- node/crypto.d.ts +76 -8
- node/dgram.d.ts +3 -3
- node/fs/promises.d.ts +2 -2
- node/fs.d.ts +8 -8
- node/globals.d.ts +3 -3
- node/http.d.ts +2 -2
- node/http2.d.ts +3 -3
- node/net.d.ts +1 -1
- node/package.json +2 -2
- node/perf_hooks.d.ts +1 -1
- node/process.d.ts +1 -1
- node/punycode.d.ts +57 -1
- node/stream.d.ts +5 -2
- node/url.d.ts +1 -1
- node/vm.d.ts +1 -1
- node/worker_threads.d.ts +49 -3
- node/zlib.d.ts +37 -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:
|
|
11
|
+
* Last updated: Fri, 16 Oct 2020 18:46:36 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
13
|
* Global values: `Buffer`, `__dirname`, `__filename`, `clearImmediate`, `clearInterval`, `clearTimeout`, `console`, `exports`, `global`, `module`, `process`, `queueMicrotask`, `require`, `setImmediate`, `setInterval`, `setTimeout`
|
|
14
14
|
|
node/child_process.d.ts
CHANGED
|
@@ -405,19 +405,23 @@ declare module "child_process" {
|
|
|
405
405
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
406
406
|
namespace execFile {
|
|
407
407
|
function __promisify__(file: string): PromiseWithChild<{ stdout: string, stderr: string }>;
|
|
408
|
-
function __promisify__(file: string, args: string
|
|
408
|
+
function __promisify__(file: string, args: ReadonlyArray<string> | undefined | null): PromiseWithChild<{ stdout: string, stderr: string }>;
|
|
409
409
|
function __promisify__(file: string, options: ExecFileOptionsWithBufferEncoding): PromiseWithChild<{ stdout: Buffer, stderr: Buffer }>;
|
|
410
|
-
function __promisify__(file: string, args: string
|
|
410
|
+
function __promisify__(file: string, args: ReadonlyArray<string> | undefined | null, options: ExecFileOptionsWithBufferEncoding): PromiseWithChild<{ stdout: Buffer, stderr: Buffer }>;
|
|
411
411
|
function __promisify__(file: string, options: ExecFileOptionsWithStringEncoding): PromiseWithChild<{ stdout: string, stderr: string }>;
|
|
412
|
-
function __promisify__(file: string, args: string
|
|
412
|
+
function __promisify__(file: string, args: ReadonlyArray<string> | undefined | null, options: ExecFileOptionsWithStringEncoding): PromiseWithChild<{ stdout: string, stderr: string }>;
|
|
413
413
|
function __promisify__(file: string, options: ExecFileOptionsWithOtherEncoding): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>;
|
|
414
|
-
function __promisify__(
|
|
414
|
+
function __promisify__(
|
|
415
|
+
file: string,
|
|
416
|
+
args: ReadonlyArray<string> | undefined | null,
|
|
417
|
+
options: ExecFileOptionsWithOtherEncoding,
|
|
418
|
+
): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>;
|
|
415
419
|
function __promisify__(file: string, options: ExecFileOptions): PromiseWithChild<{ stdout: string, stderr: string }>;
|
|
416
|
-
function __promisify__(file: string, args: string
|
|
420
|
+
function __promisify__(file: string, args: ReadonlyArray<string> | undefined | null, options: ExecFileOptions): PromiseWithChild<{ stdout: string, stderr: string }>;
|
|
417
421
|
function __promisify__(file: string, options: (BaseEncodingOptions & ExecFileOptions) | undefined | null): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>;
|
|
418
422
|
function __promisify__(
|
|
419
423
|
file: string,
|
|
420
|
-
args: string
|
|
424
|
+
args: ReadonlyArray<string> | undefined | null,
|
|
421
425
|
options: (BaseEncodingOptions & ExecFileOptions) | undefined | null,
|
|
422
426
|
): PromiseWithChild<{ stdout: string | Buffer, stderr: string | Buffer }>;
|
|
423
427
|
}
|
node/console.d.ts
CHANGED
|
@@ -66,7 +66,7 @@ declare module "console" {
|
|
|
66
66
|
* This method does not display anything unless used in the inspector.
|
|
67
67
|
* Prints to `stdout` the array `array` formatted as a table.
|
|
68
68
|
*/
|
|
69
|
-
table(tabularData: any, properties?: string
|
|
69
|
+
table(tabularData: any, properties?: ReadonlyArray<string>): void;
|
|
70
70
|
/**
|
|
71
71
|
* Starts a timer that can be used to compute the duration of an operation. Timers are identified by a unique `label`.
|
|
72
72
|
*/
|
node/crypto.d.ts
CHANGED
|
@@ -278,7 +278,7 @@ declare module "crypto" {
|
|
|
278
278
|
|
|
279
279
|
function createPrivateKey(key: PrivateKeyInput | string | Buffer): KeyObject;
|
|
280
280
|
function createPublicKey(key: PublicKeyInput | string | Buffer | KeyObject): KeyObject;
|
|
281
|
-
function createSecretKey(key:
|
|
281
|
+
function createSecretKey(key: NodeJS.ArrayBufferView): KeyObject;
|
|
282
282
|
|
|
283
283
|
function createSign(algorithm: string, options?: stream.WritableOptions): Signer;
|
|
284
284
|
|
|
@@ -448,7 +448,7 @@ declare module "crypto" {
|
|
|
448
448
|
/** @deprecated since v10.0.0 */
|
|
449
449
|
const DEFAULT_ENCODING: BufferEncoding;
|
|
450
450
|
|
|
451
|
-
type KeyType = 'rsa' | 'dsa' | 'ec' | 'ed25519' | 'x25519';
|
|
451
|
+
type KeyType = 'rsa' | 'dsa' | 'ec' | 'ed25519' | 'ed448' | 'x25519' | 'x448';
|
|
452
452
|
type KeyFormat = 'pem' | 'der';
|
|
453
453
|
|
|
454
454
|
interface BasePrivateKeyEncodingOptions<T extends KeyFormat> {
|
|
@@ -468,12 +468,24 @@ declare module "crypto" {
|
|
|
468
468
|
*/
|
|
469
469
|
}
|
|
470
470
|
|
|
471
|
+
interface ED448KeyPairKeyObjectOptions {
|
|
472
|
+
/**
|
|
473
|
+
* No options.
|
|
474
|
+
*/
|
|
475
|
+
}
|
|
476
|
+
|
|
471
477
|
interface X25519KeyPairKeyObjectOptions {
|
|
472
478
|
/**
|
|
473
479
|
* No options.
|
|
474
480
|
*/
|
|
475
481
|
}
|
|
476
482
|
|
|
483
|
+
interface X448KeyPairKeyObjectOptions {
|
|
484
|
+
/**
|
|
485
|
+
* No options.
|
|
486
|
+
*/
|
|
487
|
+
}
|
|
488
|
+
|
|
477
489
|
interface ECKeyPairKeyObjectOptions {
|
|
478
490
|
/**
|
|
479
491
|
* Name of the curve to use.
|
|
@@ -568,6 +580,16 @@ declare module "crypto" {
|
|
|
568
580
|
};
|
|
569
581
|
}
|
|
570
582
|
|
|
583
|
+
interface ED448KeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
|
|
584
|
+
publicKeyEncoding: {
|
|
585
|
+
type: 'spki';
|
|
586
|
+
format: PubF;
|
|
587
|
+
};
|
|
588
|
+
privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
|
|
589
|
+
type: 'pkcs8';
|
|
590
|
+
};
|
|
591
|
+
}
|
|
592
|
+
|
|
571
593
|
interface X25519KeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
|
|
572
594
|
publicKeyEncoding: {
|
|
573
595
|
type: 'spki';
|
|
@@ -578,6 +600,16 @@ declare module "crypto" {
|
|
|
578
600
|
};
|
|
579
601
|
}
|
|
580
602
|
|
|
603
|
+
interface X448KeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
|
|
604
|
+
publicKeyEncoding: {
|
|
605
|
+
type: 'spki';
|
|
606
|
+
format: PubF;
|
|
607
|
+
};
|
|
608
|
+
privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
|
|
609
|
+
type: 'pkcs8';
|
|
610
|
+
};
|
|
611
|
+
}
|
|
612
|
+
|
|
581
613
|
interface KeyPairSyncResult<T1 extends string | Buffer, T2 extends string | Buffer> {
|
|
582
614
|
publicKey: T1;
|
|
583
615
|
privateKey: T2;
|
|
@@ -605,13 +637,25 @@ declare module "crypto" {
|
|
|
605
637
|
function generateKeyPairSync(type: 'ed25519', options: ED25519KeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
|
|
606
638
|
function generateKeyPairSync(type: 'ed25519', options: ED25519KeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
|
|
607
639
|
function generateKeyPairSync(type: 'ed25519', options: ED25519KeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
|
|
608
|
-
function generateKeyPairSync(type: 'ed25519', options
|
|
640
|
+
function generateKeyPairSync(type: 'ed25519', options?: ED25519KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
|
|
641
|
+
|
|
642
|
+
function generateKeyPairSync(type: 'ed448', options: ED448KeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
|
|
643
|
+
function generateKeyPairSync(type: 'ed448', options: ED448KeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
|
|
644
|
+
function generateKeyPairSync(type: 'ed448', options: ED448KeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
|
|
645
|
+
function generateKeyPairSync(type: 'ed448', options: ED448KeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
|
|
646
|
+
function generateKeyPairSync(type: 'ed448', options?: ED448KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
|
|
609
647
|
|
|
610
648
|
function generateKeyPairSync(type: 'x25519', options: X25519KeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
|
|
611
649
|
function generateKeyPairSync(type: 'x25519', options: X25519KeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
|
|
612
650
|
function generateKeyPairSync(type: 'x25519', options: X25519KeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
|
|
613
651
|
function generateKeyPairSync(type: 'x25519', options: X25519KeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
|
|
614
|
-
function generateKeyPairSync(type: 'x25519', options
|
|
652
|
+
function generateKeyPairSync(type: 'x25519', options?: X25519KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
|
|
653
|
+
|
|
654
|
+
function generateKeyPairSync(type: 'x448', options: X448KeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
|
|
655
|
+
function generateKeyPairSync(type: 'x448', options: X448KeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
|
|
656
|
+
function generateKeyPairSync(type: 'x448', options: X448KeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
|
|
657
|
+
function generateKeyPairSync(type: 'x448', options: X448KeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
|
|
658
|
+
function generateKeyPairSync(type: 'x448', options?: X448KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
|
|
615
659
|
|
|
616
660
|
function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
|
|
617
661
|
function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
|
|
@@ -635,13 +679,25 @@ declare module "crypto" {
|
|
|
635
679
|
function generateKeyPair(type: 'ed25519', options: ED25519KeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
|
|
636
680
|
function generateKeyPair(type: 'ed25519', options: ED25519KeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
|
|
637
681
|
function generateKeyPair(type: 'ed25519', options: ED25519KeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
|
|
638
|
-
function generateKeyPair(type: 'ed25519', options: ED25519KeyPairKeyObjectOptions, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
|
|
682
|
+
function generateKeyPair(type: 'ed25519', options: ED25519KeyPairKeyObjectOptions | undefined, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
|
|
683
|
+
|
|
684
|
+
function generateKeyPair(type: 'ed448', options: ED448KeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
|
|
685
|
+
function generateKeyPair(type: 'ed448', options: ED448KeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
|
|
686
|
+
function generateKeyPair(type: 'ed448', options: ED448KeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
|
|
687
|
+
function generateKeyPair(type: 'ed448', options: ED448KeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
|
|
688
|
+
function generateKeyPair(type: 'ed448', options: ED448KeyPairKeyObjectOptions | undefined, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
|
|
639
689
|
|
|
640
690
|
function generateKeyPair(type: 'x25519', options: X25519KeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
|
|
641
691
|
function generateKeyPair(type: 'x25519', options: X25519KeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
|
|
642
692
|
function generateKeyPair(type: 'x25519', options: X25519KeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
|
|
643
693
|
function generateKeyPair(type: 'x25519', options: X25519KeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
|
|
644
|
-
function generateKeyPair(type: 'x25519', options: X25519KeyPairKeyObjectOptions, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
|
|
694
|
+
function generateKeyPair(type: 'x25519', options: X25519KeyPairKeyObjectOptions | undefined, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
|
|
695
|
+
|
|
696
|
+
function generateKeyPair(type: 'x448', options: X448KeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
|
|
697
|
+
function generateKeyPair(type: 'x448', options: X448KeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
|
|
698
|
+
function generateKeyPair(type: 'x448', options: X448KeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
|
|
699
|
+
function generateKeyPair(type: 'x448', options: X448KeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
|
|
700
|
+
function generateKeyPair(type: 'x448', options: X448KeyPairKeyObjectOptions | undefined, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
|
|
645
701
|
|
|
646
702
|
namespace generateKeyPair {
|
|
647
703
|
function __promisify__(type: "rsa", options: RSAKeyPairOptions<'pem', 'pem'>): Promise<{ publicKey: string, privateKey: string }>;
|
|
@@ -666,13 +722,25 @@ declare module "crypto" {
|
|
|
666
722
|
function __promisify__(type: "ed25519", options: ED25519KeyPairOptions<'pem', 'der'>): Promise<{ publicKey: string, privateKey: Buffer }>;
|
|
667
723
|
function __promisify__(type: "ed25519", options: ED25519KeyPairOptions<'der', 'pem'>): Promise<{ publicKey: Buffer, privateKey: string }>;
|
|
668
724
|
function __promisify__(type: "ed25519", options: ED25519KeyPairOptions<'der', 'der'>): Promise<{ publicKey: Buffer, privateKey: Buffer }>;
|
|
669
|
-
function __promisify__(type: "ed25519", options
|
|
725
|
+
function __promisify__(type: "ed25519", options?: ED25519KeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
|
|
726
|
+
|
|
727
|
+
function __promisify__(type: "ed448", options: ED448KeyPairOptions<'pem', 'pem'>): Promise<{ publicKey: string, privateKey: string }>;
|
|
728
|
+
function __promisify__(type: "ed448", options: ED448KeyPairOptions<'pem', 'der'>): Promise<{ publicKey: string, privateKey: Buffer }>;
|
|
729
|
+
function __promisify__(type: "ed448", options: ED448KeyPairOptions<'der', 'pem'>): Promise<{ publicKey: Buffer, privateKey: string }>;
|
|
730
|
+
function __promisify__(type: "ed448", options: ED448KeyPairOptions<'der', 'der'>): Promise<{ publicKey: Buffer, privateKey: Buffer }>;
|
|
731
|
+
function __promisify__(type: "ed448", options?: ED448KeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
|
|
670
732
|
|
|
671
733
|
function __promisify__(type: "x25519", options: X25519KeyPairOptions<'pem', 'pem'>): Promise<{ publicKey: string, privateKey: string }>;
|
|
672
734
|
function __promisify__(type: "x25519", options: X25519KeyPairOptions<'pem', 'der'>): Promise<{ publicKey: string, privateKey: Buffer }>;
|
|
673
735
|
function __promisify__(type: "x25519", options: X25519KeyPairOptions<'der', 'pem'>): Promise<{ publicKey: Buffer, privateKey: string }>;
|
|
674
736
|
function __promisify__(type: "x25519", options: X25519KeyPairOptions<'der', 'der'>): Promise<{ publicKey: Buffer, privateKey: Buffer }>;
|
|
675
|
-
function __promisify__(type: "x25519", options
|
|
737
|
+
function __promisify__(type: "x25519", options?: X25519KeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
|
|
738
|
+
|
|
739
|
+
function __promisify__(type: "x448", options: X448KeyPairOptions<'pem', 'pem'>): Promise<{ publicKey: string, privateKey: string }>;
|
|
740
|
+
function __promisify__(type: "x448", options: X448KeyPairOptions<'pem', 'der'>): Promise<{ publicKey: string, privateKey: Buffer }>;
|
|
741
|
+
function __promisify__(type: "x448", options: X448KeyPairOptions<'der', 'pem'>): Promise<{ publicKey: Buffer, privateKey: string }>;
|
|
742
|
+
function __promisify__(type: "x448", options: X448KeyPairOptions<'der', 'der'>): Promise<{ publicKey: Buffer, privateKey: Buffer }>;
|
|
743
|
+
function __promisify__(type: "x448", options?: X448KeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
|
|
676
744
|
}
|
|
677
745
|
|
|
678
746
|
/**
|
node/dgram.d.ts
CHANGED
|
@@ -50,9 +50,9 @@ declare module "dgram" {
|
|
|
50
50
|
getSendBufferSize(): number;
|
|
51
51
|
ref(): this;
|
|
52
52
|
remoteAddress(): AddressInfo;
|
|
53
|
-
send(msg: string | Uint8Array | any
|
|
54
|
-
send(msg: string | Uint8Array | any
|
|
55
|
-
send(msg: string | Uint8Array | any
|
|
53
|
+
send(msg: string | Uint8Array | ReadonlyArray<any>, port?: number, address?: string, callback?: (error: Error | null, bytes: number) => void): void;
|
|
54
|
+
send(msg: string | Uint8Array | ReadonlyArray<any>, port?: number, callback?: (error: Error | null, bytes: number) => void): void;
|
|
55
|
+
send(msg: string | Uint8Array | ReadonlyArray<any>, callback?: (error: Error | null, bytes: number) => void): void;
|
|
56
56
|
send(msg: string | Uint8Array, offset: number, length: number, port?: number, address?: string, callback?: (error: Error | null, bytes: number) => void): void;
|
|
57
57
|
send(msg: string | Uint8Array, offset: number, length: number, port?: number, callback?: (error: Error | null, bytes: number) => void): void;
|
|
58
58
|
send(msg: string | Uint8Array, offset: number, length: number, callback?: (error: Error | null, bytes: number) => void): void;
|
node/fs/promises.d.ts
CHANGED
|
@@ -143,12 +143,12 @@ declare module 'fs/promises' {
|
|
|
143
143
|
/**
|
|
144
144
|
* See `fs.writev` promisified version.
|
|
145
145
|
*/
|
|
146
|
-
writev(buffers: NodeJS.ArrayBufferView
|
|
146
|
+
writev(buffers: ReadonlyArray<NodeJS.ArrayBufferView>, position?: number): Promise<WriteVResult>;
|
|
147
147
|
|
|
148
148
|
/**
|
|
149
149
|
* See `fs.readv` promisified version.
|
|
150
150
|
*/
|
|
151
|
-
readv(buffers: NodeJS.ArrayBufferView
|
|
151
|
+
readv(buffers: ReadonlyArray<NodeJS.ArrayBufferView>, position?: number): Promise<ReadVResult>;
|
|
152
152
|
|
|
153
153
|
/**
|
|
154
154
|
* Asynchronous close(2) - close a `FileHandle`.
|
node/fs.d.ts
CHANGED
|
@@ -2066,12 +2066,12 @@ declare module "fs" {
|
|
|
2066
2066
|
*/
|
|
2067
2067
|
export function writev(
|
|
2068
2068
|
fd: number,
|
|
2069
|
-
buffers: NodeJS.ArrayBufferView
|
|
2069
|
+
buffers: ReadonlyArray<NodeJS.ArrayBufferView>,
|
|
2070
2070
|
cb: (err: NodeJS.ErrnoException | null, bytesWritten: number, buffers: NodeJS.ArrayBufferView[]) => void
|
|
2071
2071
|
): void;
|
|
2072
2072
|
export function writev(
|
|
2073
2073
|
fd: number,
|
|
2074
|
-
buffers: NodeJS.ArrayBufferView
|
|
2074
|
+
buffers: ReadonlyArray<NodeJS.ArrayBufferView>,
|
|
2075
2075
|
position: number,
|
|
2076
2076
|
cb: (err: NodeJS.ErrnoException | null, bytesWritten: number, buffers: NodeJS.ArrayBufferView[]) => void
|
|
2077
2077
|
): void;
|
|
@@ -2082,22 +2082,22 @@ declare module "fs" {
|
|
|
2082
2082
|
}
|
|
2083
2083
|
|
|
2084
2084
|
export namespace writev {
|
|
2085
|
-
function __promisify__(fd: number, buffers: NodeJS.ArrayBufferView
|
|
2085
|
+
function __promisify__(fd: number, buffers: ReadonlyArray<NodeJS.ArrayBufferView>, position?: number): Promise<WriteVResult>;
|
|
2086
2086
|
}
|
|
2087
2087
|
|
|
2088
2088
|
/**
|
|
2089
2089
|
* See `writev`.
|
|
2090
2090
|
*/
|
|
2091
|
-
export function writevSync(fd: number, buffers: NodeJS.ArrayBufferView
|
|
2091
|
+
export function writevSync(fd: number, buffers: ReadonlyArray<NodeJS.ArrayBufferView>, position?: number): number;
|
|
2092
2092
|
|
|
2093
2093
|
export function readv(
|
|
2094
2094
|
fd: number,
|
|
2095
|
-
buffers: NodeJS.ArrayBufferView
|
|
2095
|
+
buffers: ReadonlyArray<NodeJS.ArrayBufferView>,
|
|
2096
2096
|
cb: (err: NodeJS.ErrnoException | null, bytesRead: number, buffers: NodeJS.ArrayBufferView[]) => void
|
|
2097
2097
|
): void;
|
|
2098
2098
|
export function readv(
|
|
2099
2099
|
fd: number,
|
|
2100
|
-
buffers: NodeJS.ArrayBufferView
|
|
2100
|
+
buffers: ReadonlyArray<NodeJS.ArrayBufferView>,
|
|
2101
2101
|
position: number,
|
|
2102
2102
|
cb: (err: NodeJS.ErrnoException | null, bytesRead: number, buffers: NodeJS.ArrayBufferView[]) => void
|
|
2103
2103
|
): void;
|
|
@@ -2108,13 +2108,13 @@ declare module "fs" {
|
|
|
2108
2108
|
}
|
|
2109
2109
|
|
|
2110
2110
|
export namespace readv {
|
|
2111
|
-
function __promisify__(fd: number, buffers: NodeJS.ArrayBufferView
|
|
2111
|
+
function __promisify__(fd: number, buffers: ReadonlyArray<NodeJS.ArrayBufferView>, position?: number): Promise<ReadVResult>;
|
|
2112
2112
|
}
|
|
2113
2113
|
|
|
2114
2114
|
/**
|
|
2115
2115
|
* See `readv`.
|
|
2116
2116
|
*/
|
|
2117
|
-
export function readvSync(fd: number, buffers: NodeJS.ArrayBufferView
|
|
2117
|
+
export function readvSync(fd: number, buffers: ReadonlyArray<NodeJS.ArrayBufferView>, position?: number): number;
|
|
2118
2118
|
|
|
2119
2119
|
export interface OpenDirOptions {
|
|
2120
2120
|
encoding?: BufferEncoding;
|
node/globals.d.ts
CHANGED
|
@@ -116,7 +116,7 @@ declare class Buffer extends Uint8Array {
|
|
|
116
116
|
* @param array The octets to store.
|
|
117
117
|
* @deprecated since v10.0.0 - Use `Buffer.from(array)` instead.
|
|
118
118
|
*/
|
|
119
|
-
constructor(array: any
|
|
119
|
+
constructor(array: ReadonlyArray<any>);
|
|
120
120
|
/**
|
|
121
121
|
* Copies the passed {buffer} data onto a new {Buffer} instance.
|
|
122
122
|
*
|
|
@@ -137,7 +137,7 @@ declare class Buffer extends Uint8Array {
|
|
|
137
137
|
* Creates a new Buffer using the passed {data}
|
|
138
138
|
* @param data data to create a new Buffer
|
|
139
139
|
*/
|
|
140
|
-
static from(data: number
|
|
140
|
+
static from(data: ReadonlyArray<number>): Buffer;
|
|
141
141
|
static from(data: Uint8Array): Buffer;
|
|
142
142
|
/**
|
|
143
143
|
* Creates a new buffer containing the coerced value of an object
|
|
@@ -191,7 +191,7 @@ declare class Buffer extends Uint8Array {
|
|
|
191
191
|
* @param totalLength Total length of the buffers when concatenated.
|
|
192
192
|
* If totalLength is not provided, it is read from the buffers in the list. However, this adds an additional loop to the function, so it is faster to provide the length explicitly.
|
|
193
193
|
*/
|
|
194
|
-
static concat(list: Uint8Array
|
|
194
|
+
static concat(list: ReadonlyArray<Uint8Array>, totalLength?: number): Buffer;
|
|
195
195
|
/**
|
|
196
196
|
* The same as buf1.compare(buf2).
|
|
197
197
|
*/
|
node/http.d.ts
CHANGED
|
@@ -166,13 +166,13 @@ declare module "http" {
|
|
|
166
166
|
constructor();
|
|
167
167
|
|
|
168
168
|
setTimeout(msecs: number, callback?: () => void): this;
|
|
169
|
-
setHeader(name: string, value: number | string | string
|
|
169
|
+
setHeader(name: string, value: number | string | ReadonlyArray<string>): void;
|
|
170
170
|
getHeader(name: string): number | string | string[] | undefined;
|
|
171
171
|
getHeaders(): OutgoingHttpHeaders;
|
|
172
172
|
getHeaderNames(): string[];
|
|
173
173
|
hasHeader(name: string): boolean;
|
|
174
174
|
removeHeader(name: string): void;
|
|
175
|
-
addTrailers(headers: OutgoingHttpHeaders |
|
|
175
|
+
addTrailers(headers: OutgoingHttpHeaders | ReadonlyArray<[string, string]>): void;
|
|
176
176
|
flushHeaders(): void;
|
|
177
177
|
}
|
|
178
178
|
|
node/http2.d.ts
CHANGED
|
@@ -356,7 +356,7 @@ declare module "http2" {
|
|
|
356
356
|
addListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
357
357
|
|
|
358
358
|
emit(event: "altsvc", alt: string, origin: string, stream: number): boolean;
|
|
359
|
-
emit(event: "origin", origins: string
|
|
359
|
+
emit(event: "origin", origins: ReadonlyArray<string>): boolean;
|
|
360
360
|
emit(event: "connect", session: ClientHttp2Session, socket: net.Socket | tls.TLSSocket): boolean;
|
|
361
361
|
emit(event: "stream", stream: ClientHttp2Stream, headers: IncomingHttpHeaders & IncomingHttpStatusHeader, flags: number): boolean;
|
|
362
362
|
emit(event: string | symbol, ...args: any[]): boolean;
|
|
@@ -571,7 +571,7 @@ declare module "http2" {
|
|
|
571
571
|
}
|
|
572
572
|
|
|
573
573
|
export class Http2ServerRequest extends stream.Readable {
|
|
574
|
-
constructor(stream: ServerHttp2Stream, headers: IncomingHttpHeaders, options: stream.ReadableOptions, rawHeaders: string
|
|
574
|
+
constructor(stream: ServerHttp2Stream, headers: IncomingHttpHeaders, options: stream.ReadableOptions, rawHeaders: ReadonlyArray<string>);
|
|
575
575
|
|
|
576
576
|
readonly aborted: boolean;
|
|
577
577
|
readonly authority: string;
|
|
@@ -662,7 +662,7 @@ declare module "http2" {
|
|
|
662
662
|
getHeaders(): OutgoingHttpHeaders;
|
|
663
663
|
hasHeader(name: string): boolean;
|
|
664
664
|
removeHeader(name: string): void;
|
|
665
|
-
setHeader(name: string, value: number | string | string
|
|
665
|
+
setHeader(name: string, value: number | string | ReadonlyArray<string>): void;
|
|
666
666
|
setTimeout(msecs: number, callback?: () => void): void;
|
|
667
667
|
write(chunk: string | Uint8Array, callback?: (err: Error) => void): boolean;
|
|
668
668
|
write(chunk: string | Uint8Array, encoding: BufferEncoding, callback?: (err: Error) => void): boolean;
|
node/net.d.ts
CHANGED
|
@@ -71,7 +71,7 @@ declare module "net" {
|
|
|
71
71
|
setTimeout(timeout: number, callback?: () => void): this;
|
|
72
72
|
setNoDelay(noDelay?: boolean): this;
|
|
73
73
|
setKeepAlive(enable?: boolean, initialDelay?: number): this;
|
|
74
|
-
address(): AddressInfo |
|
|
74
|
+
address(): AddressInfo | {};
|
|
75
75
|
unref(): this;
|
|
76
76
|
ref(): this;
|
|
77
77
|
|
node/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "14.11.
|
|
3
|
+
"version": "14.11.10",
|
|
4
4
|
"description": "TypeScript definitions for Node.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"contributors": [
|
|
@@ -246,6 +246,6 @@
|
|
|
246
246
|
},
|
|
247
247
|
"scripts": {},
|
|
248
248
|
"dependencies": {},
|
|
249
|
-
"typesPublisherContentHash": "
|
|
249
|
+
"typesPublisherContentHash": "c59f30458de89822a9f39049caff741590f879e0d2de7dd3d3d00d2f074236b9",
|
|
250
250
|
"typeScriptVersion": "3.2"
|
|
251
251
|
}
|
node/perf_hooks.d.ts
CHANGED
|
@@ -186,7 +186,7 @@ declare module 'perf_hooks' {
|
|
|
186
186
|
* Property buffered defaults to false.
|
|
187
187
|
* @param options
|
|
188
188
|
*/
|
|
189
|
-
observe(options: { entryTypes: EntryType
|
|
189
|
+
observe(options: { entryTypes: ReadonlyArray<EntryType>; buffered?: boolean }): void;
|
|
190
190
|
}
|
|
191
191
|
|
|
192
192
|
namespace constants {
|
node/process.d.ts
CHANGED
|
@@ -209,7 +209,7 @@ declare module "process" {
|
|
|
209
209
|
getegid(): number;
|
|
210
210
|
setegid(id: number | string): void;
|
|
211
211
|
getgroups(): number[];
|
|
212
|
-
setgroups(groups:
|
|
212
|
+
setgroups(groups: ReadonlyArray<string | number>): void;
|
|
213
213
|
setUncaughtExceptionCaptureCallback(cb: ((err: Error) => void) | null): void;
|
|
214
214
|
hasUncaughtExceptionCaptureCallback(): boolean;
|
|
215
215
|
version: string;
|
node/punycode.d.ts
CHANGED
|
@@ -1,12 +1,68 @@
|
|
|
1
1
|
declare module "punycode" {
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated since v7.0.0
|
|
4
|
+
* The version of the punycode module bundled in Node.js is being deprecated.
|
|
5
|
+
* In a future major version of Node.js this module will be removed.
|
|
6
|
+
* Users currently depending on the punycode module should switch to using
|
|
7
|
+
* the userland-provided Punycode.js module instead.
|
|
8
|
+
*/
|
|
2
9
|
function decode(string: string): string;
|
|
10
|
+
/**
|
|
11
|
+
* @deprecated since v7.0.0
|
|
12
|
+
* The version of the punycode module bundled in Node.js is being deprecated.
|
|
13
|
+
* In a future major version of Node.js this module will be removed.
|
|
14
|
+
* Users currently depending on the punycode module should switch to using
|
|
15
|
+
* the userland-provided Punycode.js module instead.
|
|
16
|
+
*/
|
|
3
17
|
function encode(string: string): string;
|
|
18
|
+
/**
|
|
19
|
+
* @deprecated since v7.0.0
|
|
20
|
+
* The version of the punycode module bundled in Node.js is being deprecated.
|
|
21
|
+
* In a future major version of Node.js this module will be removed.
|
|
22
|
+
* Users currently depending on the punycode module should switch to using
|
|
23
|
+
* the userland-provided Punycode.js module instead.
|
|
24
|
+
*/
|
|
4
25
|
function toUnicode(domain: string): string;
|
|
26
|
+
/**
|
|
27
|
+
* @deprecated since v7.0.0
|
|
28
|
+
* The version of the punycode module bundled in Node.js is being deprecated.
|
|
29
|
+
* In a future major version of Node.js this module will be removed.
|
|
30
|
+
* Users currently depending on the punycode module should switch to using
|
|
31
|
+
* the userland-provided Punycode.js module instead.
|
|
32
|
+
*/
|
|
5
33
|
function toASCII(domain: string): string;
|
|
34
|
+
/**
|
|
35
|
+
* @deprecated since v7.0.0
|
|
36
|
+
* The version of the punycode module bundled in Node.js is being deprecated.
|
|
37
|
+
* In a future major version of Node.js this module will be removed.
|
|
38
|
+
* Users currently depending on the punycode module should switch to using
|
|
39
|
+
* the userland-provided Punycode.js module instead.
|
|
40
|
+
*/
|
|
6
41
|
const ucs2: ucs2;
|
|
7
42
|
interface ucs2 {
|
|
43
|
+
/**
|
|
44
|
+
* @deprecated since v7.0.0
|
|
45
|
+
* The version of the punycode module bundled in Node.js is being deprecated.
|
|
46
|
+
* In a future major version of Node.js this module will be removed.
|
|
47
|
+
* Users currently depending on the punycode module should switch to using
|
|
48
|
+
* the userland-provided Punycode.js module instead.
|
|
49
|
+
*/
|
|
8
50
|
decode(string: string): number[];
|
|
9
|
-
|
|
51
|
+
/**
|
|
52
|
+
* @deprecated since v7.0.0
|
|
53
|
+
* The version of the punycode module bundled in Node.js is being deprecated.
|
|
54
|
+
* In a future major version of Node.js this module will be removed.
|
|
55
|
+
* Users currently depending on the punycode module should switch to using
|
|
56
|
+
* the userland-provided Punycode.js module instead.
|
|
57
|
+
*/
|
|
58
|
+
encode(codePoints: ReadonlyArray<number>): string;
|
|
10
59
|
}
|
|
60
|
+
/**
|
|
61
|
+
* @deprecated since v7.0.0
|
|
62
|
+
* The version of the punycode module bundled in Node.js is being deprecated.
|
|
63
|
+
* In a future major version of Node.js this module will be removed.
|
|
64
|
+
* Users currently depending on the punycode module should switch to using
|
|
65
|
+
* the userland-provided Punycode.js module instead.
|
|
66
|
+
*/
|
|
11
67
|
const version: string;
|
|
12
68
|
}
|
node/stream.d.ts
CHANGED
|
@@ -314,7 +314,10 @@ declare module "stream" {
|
|
|
314
314
|
stream5: T,
|
|
315
315
|
callback?: (err: NodeJS.ErrnoException | null) => void,
|
|
316
316
|
): T;
|
|
317
|
-
function pipeline(
|
|
317
|
+
function pipeline(
|
|
318
|
+
streams: ReadonlyArray<NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream>,
|
|
319
|
+
callback?: (err: NodeJS.ErrnoException | null) => void,
|
|
320
|
+
): NodeJS.WritableStream;
|
|
318
321
|
function pipeline(
|
|
319
322
|
stream1: NodeJS.ReadableStream,
|
|
320
323
|
stream2: NodeJS.ReadWriteStream | NodeJS.WritableStream,
|
|
@@ -331,7 +334,7 @@ declare module "stream" {
|
|
|
331
334
|
stream4: NodeJS.ReadWriteStream,
|
|
332
335
|
stream5: NodeJS.WritableStream,
|
|
333
336
|
): Promise<void>;
|
|
334
|
-
function __promisify__(streams:
|
|
337
|
+
function __promisify__(streams: ReadonlyArray<NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream>): Promise<void>;
|
|
335
338
|
function __promisify__(
|
|
336
339
|
stream1: NodeJS.ReadableStream,
|
|
337
340
|
stream2: NodeJS.ReadWriteStream | NodeJS.WritableStream,
|
node/url.d.ts
CHANGED
|
@@ -92,7 +92,7 @@ declare module "url" {
|
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
class URLSearchParams implements Iterable<[string, string]> {
|
|
95
|
-
constructor(init?: URLSearchParams | string | NodeJS.Dict<string | string
|
|
95
|
+
constructor(init?: URLSearchParams | string | NodeJS.Dict<string | ReadonlyArray<string>> | Iterable<[string, string]> | ReadonlyArray<[string, string]>);
|
|
96
96
|
append(name: string, value: string): void;
|
|
97
97
|
delete(name: string): void;
|
|
98
98
|
entries(): IterableIterator<[string, string]>;
|
node/vm.d.ts
CHANGED
|
@@ -125,7 +125,7 @@ declare module "vm" {
|
|
|
125
125
|
function runInContext(code: string, contextifiedSandbox: Context, options?: RunningScriptOptions | string): any;
|
|
126
126
|
function runInNewContext(code: string, sandbox?: Context, options?: RunningScriptOptions | string): any;
|
|
127
127
|
function runInThisContext(code: string, options?: RunningScriptOptions | string): any;
|
|
128
|
-
function compileFunction(code: string, params?: string
|
|
128
|
+
function compileFunction(code: string, params?: ReadonlyArray<string>, options?: CompileFunctionOptions): Function;
|
|
129
129
|
|
|
130
130
|
/**
|
|
131
131
|
* Measure the memory known to V8 and used by the current execution context or a specified context.
|
node/worker_threads.d.ts
CHANGED
|
@@ -3,9 +3,11 @@ declare module "worker_threads" {
|
|
|
3
3
|
import { EventEmitter } from "events";
|
|
4
4
|
import { Readable, Writable } from "stream";
|
|
5
5
|
import { URL } from "url";
|
|
6
|
+
import { FileHandle } from "fs/promises";
|
|
6
7
|
|
|
7
8
|
const isMainThread: boolean;
|
|
8
9
|
const parentPort: null | MessagePort;
|
|
10
|
+
const resourceLimits: ResourceLimits;
|
|
9
11
|
const SHARE_ENV: unique symbol;
|
|
10
12
|
const threadId: number;
|
|
11
13
|
const workerData: any;
|
|
@@ -15,43 +17,53 @@ declare module "worker_threads" {
|
|
|
15
17
|
readonly port2: MessagePort;
|
|
16
18
|
}
|
|
17
19
|
|
|
20
|
+
type TransferListItem = ArrayBuffer | MessagePort | FileHandle;
|
|
21
|
+
|
|
18
22
|
class MessagePort extends EventEmitter {
|
|
19
23
|
close(): void;
|
|
20
|
-
postMessage(value: any, transferList?:
|
|
24
|
+
postMessage(value: any, transferList?: ReadonlyArray<TransferListItem>): void;
|
|
21
25
|
ref(): void;
|
|
22
26
|
unref(): void;
|
|
23
27
|
start(): void;
|
|
24
28
|
|
|
25
29
|
addListener(event: "close", listener: () => void): this;
|
|
26
30
|
addListener(event: "message", listener: (value: any) => void): this;
|
|
31
|
+
addListener(event: "messageerror", listener: (error: Error) => void): this;
|
|
27
32
|
addListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
28
33
|
|
|
29
34
|
emit(event: "close"): boolean;
|
|
30
35
|
emit(event: "message", value: any): boolean;
|
|
36
|
+
emit(event: "messageerror", error: Error): boolean;
|
|
31
37
|
emit(event: string | symbol, ...args: any[]): boolean;
|
|
32
38
|
|
|
33
39
|
on(event: "close", listener: () => void): this;
|
|
34
40
|
on(event: "message", listener: (value: any) => void): this;
|
|
41
|
+
on(event: "messageerror", listener: (error: Error) => void): this;
|
|
35
42
|
on(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
36
43
|
|
|
37
44
|
once(event: "close", listener: () => void): this;
|
|
38
45
|
once(event: "message", listener: (value: any) => void): this;
|
|
46
|
+
once(event: "messageerror", listener: (error: Error) => void): this;
|
|
39
47
|
once(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
40
48
|
|
|
41
49
|
prependListener(event: "close", listener: () => void): this;
|
|
42
50
|
prependListener(event: "message", listener: (value: any) => void): this;
|
|
51
|
+
prependListener(event: "messageerror", listener: (error: Error) => void): this;
|
|
43
52
|
prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
44
53
|
|
|
45
54
|
prependOnceListener(event: "close", listener: () => void): this;
|
|
46
55
|
prependOnceListener(event: "message", listener: (value: any) => void): this;
|
|
56
|
+
prependOnceListener(event: "messageerror", listener: (error: Error) => void): this;
|
|
47
57
|
prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
48
58
|
|
|
49
59
|
removeListener(event: "close", listener: () => void): this;
|
|
50
60
|
removeListener(event: "message", listener: (value: any) => void): this;
|
|
61
|
+
removeListener(event: "messageerror", listener: (error: Error) => void): this;
|
|
51
62
|
removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
52
63
|
|
|
53
64
|
off(event: "close", listener: () => void): this;
|
|
54
65
|
off(event: "message", listener: (value: any) => void): this;
|
|
66
|
+
off(event: "messageerror", listener: (error: Error) => void): this;
|
|
55
67
|
off(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
56
68
|
}
|
|
57
69
|
|
|
@@ -74,14 +86,28 @@ declare module "worker_threads" {
|
|
|
74
86
|
/**
|
|
75
87
|
* Additional data to send in the first worker message.
|
|
76
88
|
*/
|
|
77
|
-
transferList?:
|
|
89
|
+
transferList?: TransferListItem[];
|
|
78
90
|
trackUnmanagedFds?: boolean;
|
|
79
91
|
}
|
|
80
92
|
|
|
81
93
|
interface ResourceLimits {
|
|
94
|
+
/**
|
|
95
|
+
* The maximum size of a heap space for recently created objects.
|
|
96
|
+
*/
|
|
82
97
|
maxYoungGenerationSizeMb?: number;
|
|
98
|
+
/**
|
|
99
|
+
* The maximum size of the main heap in MB.
|
|
100
|
+
*/
|
|
83
101
|
maxOldGenerationSizeMb?: number;
|
|
102
|
+
/**
|
|
103
|
+
* The size of a pre-allocated memory range used for generated code.
|
|
104
|
+
*/
|
|
84
105
|
codeRangeSizeMb?: number;
|
|
106
|
+
/**
|
|
107
|
+
* The default maximum stack size for the thread. Small values may lead to unusable Worker instances.
|
|
108
|
+
* @default 4
|
|
109
|
+
*/
|
|
110
|
+
stackSizeMb?: number;
|
|
85
111
|
}
|
|
86
112
|
|
|
87
113
|
class Worker extends EventEmitter {
|
|
@@ -98,7 +124,7 @@ declare module "worker_threads" {
|
|
|
98
124
|
*/
|
|
99
125
|
constructor(filename: string | URL, options?: WorkerOptions);
|
|
100
126
|
|
|
101
|
-
postMessage(value: any, transferList?:
|
|
127
|
+
postMessage(value: any, transferList?: ReadonlyArray<TransferListItem>): void;
|
|
102
128
|
ref(): void;
|
|
103
129
|
unref(): void;
|
|
104
130
|
/**
|
|
@@ -120,52 +146,72 @@ declare module "worker_threads" {
|
|
|
120
146
|
addListener(event: "error", listener: (err: Error) => void): this;
|
|
121
147
|
addListener(event: "exit", listener: (exitCode: number) => void): this;
|
|
122
148
|
addListener(event: "message", listener: (value: any) => void): this;
|
|
149
|
+
addListener(event: "messageerror", listener: (error: Error) => void): this;
|
|
123
150
|
addListener(event: "online", listener: () => void): this;
|
|
124
151
|
addListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
125
152
|
|
|
126
153
|
emit(event: "error", err: Error): boolean;
|
|
127
154
|
emit(event: "exit", exitCode: number): boolean;
|
|
128
155
|
emit(event: "message", value: any): boolean;
|
|
156
|
+
emit(event: "messageerror", error: Error): boolean;
|
|
129
157
|
emit(event: "online"): boolean;
|
|
130
158
|
emit(event: string | symbol, ...args: any[]): boolean;
|
|
131
159
|
|
|
132
160
|
on(event: "error", listener: (err: Error) => void): this;
|
|
133
161
|
on(event: "exit", listener: (exitCode: number) => void): this;
|
|
134
162
|
on(event: "message", listener: (value: any) => void): this;
|
|
163
|
+
on(event: "messageerror", listener: (error: Error) => void): this;
|
|
135
164
|
on(event: "online", listener: () => void): this;
|
|
136
165
|
on(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
137
166
|
|
|
138
167
|
once(event: "error", listener: (err: Error) => void): this;
|
|
139
168
|
once(event: "exit", listener: (exitCode: number) => void): this;
|
|
140
169
|
once(event: "message", listener: (value: any) => void): this;
|
|
170
|
+
once(event: "messageerror", listener: (error: Error) => void): this;
|
|
141
171
|
once(event: "online", listener: () => void): this;
|
|
142
172
|
once(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
143
173
|
|
|
144
174
|
prependListener(event: "error", listener: (err: Error) => void): this;
|
|
145
175
|
prependListener(event: "exit", listener: (exitCode: number) => void): this;
|
|
146
176
|
prependListener(event: "message", listener: (value: any) => void): this;
|
|
177
|
+
prependListener(event: "messageerror", listener: (error: Error) => void): this;
|
|
147
178
|
prependListener(event: "online", listener: () => void): this;
|
|
148
179
|
prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
149
180
|
|
|
150
181
|
prependOnceListener(event: "error", listener: (err: Error) => void): this;
|
|
151
182
|
prependOnceListener(event: "exit", listener: (exitCode: number) => void): this;
|
|
152
183
|
prependOnceListener(event: "message", listener: (value: any) => void): this;
|
|
184
|
+
prependOnceListener(event: "messageerror", listener: (error: Error) => void): this;
|
|
153
185
|
prependOnceListener(event: "online", listener: () => void): this;
|
|
154
186
|
prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
155
187
|
|
|
156
188
|
removeListener(event: "error", listener: (err: Error) => void): this;
|
|
157
189
|
removeListener(event: "exit", listener: (exitCode: number) => void): this;
|
|
158
190
|
removeListener(event: "message", listener: (value: any) => void): this;
|
|
191
|
+
removeListener(event: "messageerror", listener: (error: Error) => void): this;
|
|
159
192
|
removeListener(event: "online", listener: () => void): this;
|
|
160
193
|
removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
161
194
|
|
|
162
195
|
off(event: "error", listener: (err: Error) => void): this;
|
|
163
196
|
off(event: "exit", listener: (exitCode: number) => void): this;
|
|
164
197
|
off(event: "message", listener: (value: any) => void): this;
|
|
198
|
+
off(event: "messageerror", listener: (error: Error) => void): this;
|
|
165
199
|
off(event: "online", listener: () => void): this;
|
|
166
200
|
off(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
167
201
|
}
|
|
168
202
|
|
|
203
|
+
/**
|
|
204
|
+
* Mark an object as not transferable.
|
|
205
|
+
* If `object` occurs in the transfer list of a `port.postMessage()` call, it will be ignored.
|
|
206
|
+
*
|
|
207
|
+
* In particular, this makes sense for objects that can be cloned, rather than transferred,
|
|
208
|
+
* and which are used by other objects on the sending side. For example, Node.js marks
|
|
209
|
+
* the `ArrayBuffer`s it uses for its Buffer pool with this.
|
|
210
|
+
*
|
|
211
|
+
* This operation cannot be undone.
|
|
212
|
+
*/
|
|
213
|
+
function markAsUntransferable(object: object): void;
|
|
214
|
+
|
|
169
215
|
/**
|
|
170
216
|
* Transfer a `MessagePort` to a different `vm` Context. The original `port`
|
|
171
217
|
* object will be rendered unusable, and the returned `MessagePort` instance will
|
node/zlib.d.ts
CHANGED
|
@@ -114,6 +114,43 @@ declare module "zlib" {
|
|
|
114
114
|
function unzip(buf: InputType, options: ZlibOptions, callback: CompressCallback): void;
|
|
115
115
|
function unzipSync(buf: InputType, options?: ZlibOptions): Buffer;
|
|
116
116
|
|
|
117
|
+
namespace brotliCompress {
|
|
118
|
+
function __promisify__(buffer: InputType, options: BrotliOptions): Promise<Buffer>;
|
|
119
|
+
function __promisify__(buffer: InputType): Promise<Buffer>;
|
|
120
|
+
}
|
|
121
|
+
namespace brotliDecompress {
|
|
122
|
+
function __promisify__(buffer: InputType, options: BrotliOptions): Promise<Buffer>;
|
|
123
|
+
function __promisify__(buffer: InputType): Promise<Buffer>;
|
|
124
|
+
}
|
|
125
|
+
namespace deflate {
|
|
126
|
+
function __promisify__(buffer: InputType): Promise<Buffer>;
|
|
127
|
+
function __promisify__(buffer: InputType, options: ZlibOptions): Promise<Buffer>;
|
|
128
|
+
}
|
|
129
|
+
namespace deflateRaw {
|
|
130
|
+
function __promisify__(buffer: InputType): Promise<Buffer>;
|
|
131
|
+
function __promisify__(buffer: InputType, options: ZlibOptions): Promise<Buffer>;
|
|
132
|
+
}
|
|
133
|
+
namespace gzip {
|
|
134
|
+
function __promisify__(buffer: InputType): Promise<Buffer>;
|
|
135
|
+
function __promisify__(buffer: InputType, options: ZlibOptions): Promise<Buffer>;
|
|
136
|
+
}
|
|
137
|
+
namespace gunzip {
|
|
138
|
+
function __promisify__(buffer: InputType): Promise<Buffer>;
|
|
139
|
+
function __promisify__(buffer: InputType, options: ZlibOptions): Promise<Buffer>;
|
|
140
|
+
}
|
|
141
|
+
namespace inflate {
|
|
142
|
+
function __promisify__(buffer: InputType): Promise<Buffer>;
|
|
143
|
+
function __promisify__(buffer: InputType, options: ZlibOptions): Promise<Buffer>;
|
|
144
|
+
}
|
|
145
|
+
namespace inflateRaw {
|
|
146
|
+
function __promisify__(buffer: InputType): Promise<Buffer>;
|
|
147
|
+
function __promisify__(buffer: InputType, options: ZlibOptions): Promise<Buffer>;
|
|
148
|
+
}
|
|
149
|
+
namespace unzip {
|
|
150
|
+
function __promisify__(buffer: InputType): Promise<Buffer>;
|
|
151
|
+
function __promisify__(buffer: InputType, options: ZlibOptions): Promise<Buffer>;
|
|
152
|
+
}
|
|
153
|
+
|
|
117
154
|
namespace constants {
|
|
118
155
|
const BROTLI_DECODE: number;
|
|
119
156
|
const BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES: number;
|