@types/node 14.6.3 → 14.10.2
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/assert.d.ts +29 -2
- node/{ts3.1/async_hooks.d.ts → async_hooks.d.ts} +13 -0
- node/{ts3.1/buffer.d.ts → buffer.d.ts} +0 -0
- node/{ts3.1/child_process.d.ts → child_process.d.ts} +0 -0
- node/{ts3.1/cluster.d.ts → cluster.d.ts} +0 -0
- node/{ts3.1/console.d.ts → console.d.ts} +0 -0
- node/{ts3.1/constants.d.ts → constants.d.ts} +0 -0
- node/{ts3.1/crypto.d.ts → crypto.d.ts} +53 -3
- node/{ts3.1/dgram.d.ts → dgram.d.ts} +0 -0
- node/{ts3.1/dns.d.ts → dns.d.ts} +0 -0
- node/{ts3.1/domain.d.ts → domain.d.ts} +0 -0
- node/{ts3.1/events.d.ts → events.d.ts} +0 -0
- node/{ts3.1/fs → fs}/promises.d.ts +0 -0
- node/{ts3.4/fs.d.ts → fs.d.ts} +1 -1
- node/{ts3.4/globals.d.ts → globals.d.ts} +1 -1
- node/{ts3.6/globals.global.d.ts → globals.global.d.ts} +0 -0
- node/{ts3.1/http.d.ts → http.d.ts} +0 -0
- node/{ts3.1/http2.d.ts → http2.d.ts} +0 -0
- node/{ts3.1/https.d.ts → https.d.ts} +0 -0
- node/index.d.ts +1 -1
- node/{ts3.1/inspector.d.ts → inspector.d.ts} +0 -0
- node/{ts3.1/module.d.ts → module.d.ts} +0 -0
- node/{ts3.1/net.d.ts → net.d.ts} +0 -0
- node/{ts3.1/os.d.ts → os.d.ts} +0 -0
- node/package.json +3 -3
- node/{ts3.1/path.d.ts → path.d.ts} +0 -0
- node/{ts3.1/perf_hooks.d.ts → perf_hooks.d.ts} +26 -76
- node/{ts3.4/process.d.ts → process.d.ts} +1 -1
- node/{ts3.1/punycode.d.ts → punycode.d.ts} +0 -0
- node/{ts3.1/querystring.d.ts → querystring.d.ts} +0 -0
- node/{ts3.1/readline.d.ts → readline.d.ts} +0 -0
- node/{ts3.1/repl.d.ts → repl.d.ts} +0 -0
- node/{ts3.1/stream.d.ts → stream.d.ts} +0 -0
- node/{ts3.1/string_decoder.d.ts → string_decoder.d.ts} +0 -0
- node/{ts3.1/timers.d.ts → timers.d.ts} +0 -0
- node/{ts3.1/tls.d.ts → tls.d.ts} +0 -0
- node/{ts3.1/trace_events.d.ts → trace_events.d.ts} +0 -0
- node/ts3.1/base.d.ts +36 -36
- node/ts3.1/globals.d.ts +7 -1
- node/ts3.1/process.d.ts +8 -0
- node/ts3.4/base.d.ts +4 -4
- node/ts3.6/base.d.ts +2 -2
- node/{ts3.1/tty.d.ts → tty.d.ts} +0 -0
- node/{ts3.1/url.d.ts → url.d.ts} +0 -0
- node/{ts3.4/util.d.ts → util.d.ts} +1 -1
- /node/{ts3.1/v8.d.ts → v8.d.ts} +0 -0
- /node/{ts3.1/vm.d.ts → vm.d.ts} +0 -0
- /node/{ts3.6/wasi.d.ts → wasi.d.ts} +0 -0
- /node/{ts3.1/worker_threads.d.ts → worker_threads.d.ts} +0 -0
- /node/{ts3.1/zlib.d.ts → zlib.d.ts} +0 -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: Tue, 15 Sep 2020 18:22:44 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`, `Symbol`
|
|
14
14
|
|
node/assert.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
declare module "assert" {
|
|
2
|
+
/** An alias of `assert.ok()`. */
|
|
2
3
|
function assert(value: any, message?: string | Error): asserts value;
|
|
3
4
|
namespace assert {
|
|
4
5
|
class AssertionError implements Error {
|
|
@@ -11,11 +12,37 @@ declare module "assert" {
|
|
|
11
12
|
code: 'ERR_ASSERTION';
|
|
12
13
|
|
|
13
14
|
constructor(options?: {
|
|
14
|
-
message
|
|
15
|
-
|
|
15
|
+
/** If provided, the error message is set to this value. */
|
|
16
|
+
message?: string;
|
|
17
|
+
/** The `actual` property on the error instance. */
|
|
18
|
+
actual?: any;
|
|
19
|
+
/** The `expected` property on the error instance. */
|
|
20
|
+
expected?: any;
|
|
21
|
+
/** The `operator` property on the error instance. */
|
|
22
|
+
operator?: string;
|
|
23
|
+
/** If provided, the generated stack trace omits frames before this function. */
|
|
24
|
+
stackStartFn?: Function
|
|
16
25
|
});
|
|
17
26
|
}
|
|
18
27
|
|
|
28
|
+
class CallTracker {
|
|
29
|
+
calls(exact?: number): () => void;
|
|
30
|
+
calls<Func extends (...args: any[]) => any>(fn?: Func, exact?: number): Func;
|
|
31
|
+
report(): CallTrackerReportInformation[];
|
|
32
|
+
verify(): void;
|
|
33
|
+
}
|
|
34
|
+
export interface CallTrackerReportInformation {
|
|
35
|
+
message: string;
|
|
36
|
+
/** The actual number of times the function was called. */
|
|
37
|
+
actual: number;
|
|
38
|
+
/** The number of times the function was expected to be called. */
|
|
39
|
+
expected: number;
|
|
40
|
+
/** The name of the function that is wrapped. */
|
|
41
|
+
operator: string;
|
|
42
|
+
/** A stack trace of the function. */
|
|
43
|
+
stack: object;
|
|
44
|
+
}
|
|
45
|
+
|
|
19
46
|
type AssertPredicate = RegExp | (new() => object) | ((thrown: any) => boolean) | object | Error;
|
|
20
47
|
|
|
21
48
|
function fail(message?: string | Error): never;
|
|
@@ -115,6 +115,19 @@ declare module "async_hooks" {
|
|
|
115
115
|
*/
|
|
116
116
|
constructor(type: string, triggerAsyncId?: number|AsyncResourceOptions);
|
|
117
117
|
|
|
118
|
+
/**
|
|
119
|
+
* Binds the given function to the current execution context.
|
|
120
|
+
* @param fn The function to bind to the current execution context.
|
|
121
|
+
* @param type An optional name to associate with the underlying `AsyncResource`.
|
|
122
|
+
*/
|
|
123
|
+
static bind<Func extends (...args: any[]) => any>(fn: Func, type?: string): Func & { asyncResource: AsyncResource };
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Binds the given function to execute to this `AsyncResource`'s scope.
|
|
127
|
+
* @param fn The function to bind to the current `AsyncResource`.
|
|
128
|
+
*/
|
|
129
|
+
bind<Func extends (...args: any[]) => any>(fn: Func): Func & { asyncResource: AsyncResource };
|
|
130
|
+
|
|
118
131
|
/**
|
|
119
132
|
* Call the provided function with the provided arguments in the
|
|
120
133
|
* execution context of the async resource. This will establish the
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -358,6 +358,11 @@ declare module "crypto" {
|
|
|
358
358
|
function pseudoRandomBytes(size: number): Buffer;
|
|
359
359
|
function pseudoRandomBytes(size: number, callback: (err: Error | null, buf: Buffer) => void): void;
|
|
360
360
|
|
|
361
|
+
function randomInt(max: number): number;
|
|
362
|
+
function randomInt(min: number, max: number): number;
|
|
363
|
+
function randomInt(max: number, callback: (err: Error | null, value: number) => void): void;
|
|
364
|
+
function randomInt(min: number, max: number, callback: (err: Error | null, value: number) => void): void;
|
|
365
|
+
|
|
361
366
|
function randomFillSync<T extends NodeJS.ArrayBufferView>(buffer: T, offset?: number, size?: number): T;
|
|
362
367
|
function randomFill<T extends NodeJS.ArrayBufferView>(buffer: T, callback: (err: Error | null, buf: T) => void): void;
|
|
363
368
|
function randomFill<T extends NodeJS.ArrayBufferView>(buffer: T, offset: number, callback: (err: Error | null, buf: T) => void): void;
|
|
@@ -403,6 +408,7 @@ declare module "crypto" {
|
|
|
403
408
|
function privateEncrypt(private_key: RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): Buffer;
|
|
404
409
|
function getCiphers(): string[];
|
|
405
410
|
function getCurves(): string[];
|
|
411
|
+
function getFips(): 1 | 0;
|
|
406
412
|
function getHashes(): string[];
|
|
407
413
|
class ECDH {
|
|
408
414
|
private constructor();
|
|
@@ -431,7 +437,7 @@ declare module "crypto" {
|
|
|
431
437
|
/** @deprecated since v10.0.0 */
|
|
432
438
|
const DEFAULT_ENCODING: BufferEncoding;
|
|
433
439
|
|
|
434
|
-
type KeyType = 'rsa' | 'dsa' | 'ec' | 'ed25519';
|
|
440
|
+
type KeyType = 'rsa' | 'dsa' | 'ec' | 'ed25519' | 'x25519';
|
|
435
441
|
type KeyFormat = 'pem' | 'der';
|
|
436
442
|
|
|
437
443
|
interface BasePrivateKeyEncodingOptions<T extends KeyFormat> {
|
|
@@ -451,6 +457,12 @@ declare module "crypto" {
|
|
|
451
457
|
*/
|
|
452
458
|
}
|
|
453
459
|
|
|
460
|
+
interface X25519KeyPairKeyObjectOptions {
|
|
461
|
+
/**
|
|
462
|
+
* No options.
|
|
463
|
+
*/
|
|
464
|
+
}
|
|
465
|
+
|
|
454
466
|
interface ECKeyPairKeyObjectOptions {
|
|
455
467
|
/**
|
|
456
468
|
* Name of the curve to use.
|
|
@@ -537,11 +549,21 @@ declare module "crypto" {
|
|
|
537
549
|
|
|
538
550
|
interface ED25519KeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
|
|
539
551
|
publicKeyEncoding: {
|
|
540
|
-
type: '
|
|
552
|
+
type: 'spki';
|
|
541
553
|
format: PubF;
|
|
542
554
|
};
|
|
543
555
|
privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
|
|
544
|
-
type: '
|
|
556
|
+
type: 'pkcs8';
|
|
557
|
+
};
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
interface X25519KeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
|
|
561
|
+
publicKeyEncoding: {
|
|
562
|
+
type: 'spki';
|
|
563
|
+
format: PubF;
|
|
564
|
+
};
|
|
565
|
+
privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
|
|
566
|
+
type: 'pkcs8';
|
|
545
567
|
};
|
|
546
568
|
}
|
|
547
569
|
|
|
@@ -574,6 +596,12 @@ declare module "crypto" {
|
|
|
574
596
|
function generateKeyPairSync(type: 'ed25519', options: ED25519KeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
|
|
575
597
|
function generateKeyPairSync(type: 'ed25519', options: ED25519KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
|
|
576
598
|
|
|
599
|
+
function generateKeyPairSync(type: 'x25519', options: X25519KeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
|
|
600
|
+
function generateKeyPairSync(type: 'x25519', options: X25519KeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
|
|
601
|
+
function generateKeyPairSync(type: 'x25519', options: X25519KeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
|
|
602
|
+
function generateKeyPairSync(type: 'x25519', options: X25519KeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
|
|
603
|
+
function generateKeyPairSync(type: 'x25519', options: X25519KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
|
|
604
|
+
|
|
577
605
|
function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
|
|
578
606
|
function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
|
|
579
607
|
function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
|
|
@@ -598,6 +626,12 @@ declare module "crypto" {
|
|
|
598
626
|
function generateKeyPair(type: 'ed25519', options: ED25519KeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
|
|
599
627
|
function generateKeyPair(type: 'ed25519', options: ED25519KeyPairKeyObjectOptions, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
|
|
600
628
|
|
|
629
|
+
function generateKeyPair(type: 'x25519', options: X25519KeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
|
|
630
|
+
function generateKeyPair(type: 'x25519', options: X25519KeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
|
|
631
|
+
function generateKeyPair(type: 'x25519', options: X25519KeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
|
|
632
|
+
function generateKeyPair(type: 'x25519', options: X25519KeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
|
|
633
|
+
function generateKeyPair(type: 'x25519', options: X25519KeyPairKeyObjectOptions, callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void): void;
|
|
634
|
+
|
|
601
635
|
namespace generateKeyPair {
|
|
602
636
|
function __promisify__(type: "rsa", options: RSAKeyPairOptions<'pem', 'pem'>): Promise<{ publicKey: string, privateKey: string }>;
|
|
603
637
|
function __promisify__(type: "rsa", options: RSAKeyPairOptions<'pem', 'der'>): Promise<{ publicKey: string, privateKey: Buffer }>;
|
|
@@ -622,6 +656,12 @@ declare module "crypto" {
|
|
|
622
656
|
function __promisify__(type: "ed25519", options: ED25519KeyPairOptions<'der', 'pem'>): Promise<{ publicKey: Buffer, privateKey: string }>;
|
|
623
657
|
function __promisify__(type: "ed25519", options: ED25519KeyPairOptions<'der', 'der'>): Promise<{ publicKey: Buffer, privateKey: Buffer }>;
|
|
624
658
|
function __promisify__(type: "ed25519", options: ED25519KeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
|
|
659
|
+
|
|
660
|
+
function __promisify__(type: "x25519", options: X25519KeyPairOptions<'pem', 'pem'>): Promise<{ publicKey: string, privateKey: string }>;
|
|
661
|
+
function __promisify__(type: "x25519", options: X25519KeyPairOptions<'pem', 'der'>): Promise<{ publicKey: string, privateKey: Buffer }>;
|
|
662
|
+
function __promisify__(type: "x25519", options: X25519KeyPairOptions<'der', 'pem'>): Promise<{ publicKey: Buffer, privateKey: string }>;
|
|
663
|
+
function __promisify__(type: "x25519", options: X25519KeyPairOptions<'der', 'der'>): Promise<{ publicKey: Buffer, privateKey: Buffer }>;
|
|
664
|
+
function __promisify__(type: "x25519", options: X25519KeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
|
|
625
665
|
}
|
|
626
666
|
|
|
627
667
|
/**
|
|
@@ -646,4 +686,14 @@ declare module "crypto" {
|
|
|
646
686
|
* passed to [`crypto.createPublicKey()`][].
|
|
647
687
|
*/
|
|
648
688
|
function verify(algorithm: string | null | undefined, data: NodeJS.ArrayBufferView, key: KeyLike | VerifyKeyWithOptions, signature: NodeJS.ArrayBufferView): boolean;
|
|
689
|
+
|
|
690
|
+
/**
|
|
691
|
+
* Computes the Diffie-Hellman secret based on a privateKey and a publicKey.
|
|
692
|
+
* Both keys must have the same asymmetricKeyType, which must be one of
|
|
693
|
+
* 'dh' (for Diffie-Hellman), 'ec' (for ECDH), 'x448', or 'x25519' (for ECDH-ES).
|
|
694
|
+
*/
|
|
695
|
+
function diffieHellman(options: {
|
|
696
|
+
privateKey: KeyObject;
|
|
697
|
+
publicKey: KeyObject
|
|
698
|
+
}): Buffer;
|
|
649
699
|
}
|
|
File without changes
|
node/{ts3.1/dns.d.ts → dns.d.ts}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
node/{ts3.4/fs.d.ts → fs.d.ts}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
node/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Type definitions for non-npm package Node.js 14.
|
|
1
|
+
// Type definitions for non-npm package Node.js 14.10
|
|
2
2
|
// Project: http://nodejs.org/
|
|
3
3
|
// Definitions by: Microsoft TypeScript <https://github.com/Microsoft>
|
|
4
4
|
// DefinitelyTyped <https://github.com/DefinitelyTyped>
|
|
File without changes
|
|
File without changes
|
node/{ts3.1/net.d.ts → net.d.ts}
RENAMED
|
File without changes
|
node/{ts3.1/os.d.ts → os.d.ts}
RENAMED
|
File without changes
|
node/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.10.2",
|
|
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": "
|
|
250
|
-
"typeScriptVersion": "3.
|
|
249
|
+
"typesPublisherContentHash": "c035e49052c66e28eba881821f7c0c14fef24b09e49fb63a8aa08ee7f138ac67",
|
|
250
|
+
"typeScriptVersion": "3.2"
|
|
251
251
|
}
|
|
File without changes
|
|
@@ -48,74 +48,43 @@ declare module 'perf_hooks' {
|
|
|
48
48
|
readonly bootstrapComplete: number;
|
|
49
49
|
|
|
50
50
|
/**
|
|
51
|
-
* The high resolution millisecond timestamp at which
|
|
51
|
+
* The high resolution millisecond timestamp at which the Node.js process completed bootstrapping.
|
|
52
|
+
* If bootstrapping has not yet finished, the property has the value of -1.
|
|
52
53
|
*/
|
|
53
|
-
readonly
|
|
54
|
+
readonly environment: number;
|
|
54
55
|
|
|
55
56
|
/**
|
|
56
|
-
* The high resolution millisecond timestamp at which
|
|
57
|
+
* The high resolution millisecond timestamp at which the Node.js environment was initialized.
|
|
57
58
|
*/
|
|
58
|
-
readonly
|
|
59
|
+
readonly idleTime: number;
|
|
59
60
|
|
|
60
61
|
/**
|
|
61
|
-
* The high resolution millisecond timestamp
|
|
62
|
+
* The high resolution millisecond timestamp of the amount of time the event loop has been idle
|
|
63
|
+
* within the event loop's event provider (e.g. `epoll_wait`). This does not take CPU usage
|
|
64
|
+
* into consideration. If the event loop has not yet started (e.g., in the first tick of the main script),
|
|
65
|
+
* the property has the value of 0.
|
|
62
66
|
*/
|
|
63
67
|
readonly loopExit: number;
|
|
64
68
|
|
|
65
69
|
/**
|
|
66
70
|
* The high resolution millisecond timestamp at which the Node.js event loop started.
|
|
71
|
+
* If the event loop has not yet started (e.g., in the first tick of the main script), the property has the value of -1.
|
|
67
72
|
*/
|
|
68
73
|
readonly loopStart: number;
|
|
69
74
|
|
|
70
|
-
/**
|
|
71
|
-
* The high resolution millisecond timestamp at which main module load ended.
|
|
72
|
-
*/
|
|
73
|
-
readonly moduleLoadEnd: number;
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* The high resolution millisecond timestamp at which main module load started.
|
|
77
|
-
*/
|
|
78
|
-
readonly moduleLoadStart: number;
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* The high resolution millisecond timestamp at which the Node.js process was initialized.
|
|
82
|
-
*/
|
|
83
|
-
readonly nodeStart: number;
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* The high resolution millisecond timestamp at which preload module load ended.
|
|
87
|
-
*/
|
|
88
|
-
readonly preloadModuleLoadEnd: number;
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* The high resolution millisecond timestamp at which preload module load started.
|
|
92
|
-
*/
|
|
93
|
-
readonly preloadModuleLoadStart: number;
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* The high resolution millisecond timestamp at which third_party_main processing ended.
|
|
97
|
-
*/
|
|
98
|
-
readonly thirdPartyMainEnd: number;
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* The high resolution millisecond timestamp at which third_party_main processing started.
|
|
102
|
-
*/
|
|
103
|
-
readonly thirdPartyMainStart: number;
|
|
104
|
-
|
|
105
75
|
/**
|
|
106
76
|
* The high resolution millisecond timestamp at which the V8 platform was initialized.
|
|
107
77
|
*/
|
|
108
78
|
readonly v8Start: number;
|
|
109
79
|
}
|
|
110
80
|
|
|
111
|
-
interface
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
*/
|
|
117
|
-
clearFunctions(name?: string): void;
|
|
81
|
+
interface EventLoopUtilization {
|
|
82
|
+
idle: number;
|
|
83
|
+
active: number;
|
|
84
|
+
utilization: number;
|
|
85
|
+
}
|
|
118
86
|
|
|
87
|
+
interface Performance {
|
|
119
88
|
/**
|
|
120
89
|
* If name is not provided, removes all PerformanceMark objects from the Performance Timeline.
|
|
121
90
|
* If name is provided, removes only the named mark.
|
|
@@ -123,35 +92,6 @@ declare module 'perf_hooks' {
|
|
|
123
92
|
*/
|
|
124
93
|
clearMarks(name?: string): void;
|
|
125
94
|
|
|
126
|
-
/**
|
|
127
|
-
* If name is not provided, removes all PerformanceMeasure objects from the Performance Timeline.
|
|
128
|
-
* If name is provided, removes only objects whose performanceEntry.name matches name.
|
|
129
|
-
*/
|
|
130
|
-
clearMeasures(name?: string): void;
|
|
131
|
-
|
|
132
|
-
/**
|
|
133
|
-
* Returns a list of all PerformanceEntry objects in chronological order with respect to performanceEntry.startTime.
|
|
134
|
-
* @return list of all PerformanceEntry objects
|
|
135
|
-
*/
|
|
136
|
-
getEntries(): PerformanceEntry[];
|
|
137
|
-
|
|
138
|
-
/**
|
|
139
|
-
* Returns a list of all PerformanceEntry objects in chronological order with respect to performanceEntry.startTime
|
|
140
|
-
* whose performanceEntry.name is equal to name, and optionally, whose performanceEntry.entryType is equal to type.
|
|
141
|
-
* @param name
|
|
142
|
-
* @param type
|
|
143
|
-
* @return list of all PerformanceEntry objects
|
|
144
|
-
*/
|
|
145
|
-
getEntriesByName(name: string, type?: EntryType): PerformanceEntry[];
|
|
146
|
-
|
|
147
|
-
/**
|
|
148
|
-
* Returns a list of all PerformanceEntry objects in chronological order with respect to performanceEntry.startTime
|
|
149
|
-
* whose performanceEntry.entryType is equal to type.
|
|
150
|
-
* @param type
|
|
151
|
-
* @return list of all PerformanceEntry objects
|
|
152
|
-
*/
|
|
153
|
-
getEntriesByType(type: EntryType): PerformanceEntry[];
|
|
154
|
-
|
|
155
95
|
/**
|
|
156
96
|
* Creates a new PerformanceMark entry in the Performance Timeline.
|
|
157
97
|
* A PerformanceMark is a subclass of PerformanceEntry whose performanceEntry.entryType is always 'mark',
|
|
@@ -199,6 +139,16 @@ declare module 'perf_hooks' {
|
|
|
199
139
|
* @param fn
|
|
200
140
|
*/
|
|
201
141
|
timerify<T extends (...optionalParams: any[]) => any>(fn: T): T;
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* eventLoopUtilization is similar to CPU utilization except that it is calculated using high precision wall-clock time.
|
|
145
|
+
* It represents the percentage of time the event loop has spent outside the event loop's event provider (e.g. epoll_wait).
|
|
146
|
+
* No other CPU idle time is taken into consideration.
|
|
147
|
+
*
|
|
148
|
+
* @param util1 The result of a previous call to eventLoopUtilization()
|
|
149
|
+
* @param util2 The result of a previous call to eventLoopUtilization() prior to util1
|
|
150
|
+
*/
|
|
151
|
+
eventLoopUtilization(util1?: EventLoopUtilization, util2?: EventLoopUtilization): EventLoopUtilization;
|
|
202
152
|
}
|
|
203
153
|
|
|
204
154
|
interface PerformanceObserverEntryList {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
node/{ts3.1/tls.d.ts → tls.d.ts}
RENAMED
|
File without changes
|
|
File without changes
|
node/ts3.1/base.d.ts
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
1
|
// base definitions for all NodeJS modules that are not specific to any version of TypeScript
|
|
2
2
|
|
|
3
3
|
/// <reference path="globals.d.ts" />
|
|
4
|
-
/// <reference path="async_hooks.d.ts" />
|
|
5
|
-
/// <reference path="buffer.d.ts" />
|
|
6
|
-
/// <reference path="child_process.d.ts" />
|
|
7
|
-
/// <reference path="cluster.d.ts" />
|
|
8
|
-
/// <reference path="console.d.ts" />
|
|
9
|
-
/// <reference path="constants.d.ts" />
|
|
10
|
-
/// <reference path="crypto.d.ts" />
|
|
11
|
-
/// <reference path="dgram.d.ts" />
|
|
12
|
-
/// <reference path="dns.d.ts" />
|
|
13
|
-
/// <reference path="domain.d.ts" />
|
|
14
|
-
/// <reference path="events.d.ts" />
|
|
4
|
+
/// <reference path="../async_hooks.d.ts" />
|
|
5
|
+
/// <reference path="../buffer.d.ts" />
|
|
6
|
+
/// <reference path="../child_process.d.ts" />
|
|
7
|
+
/// <reference path="../cluster.d.ts" />
|
|
8
|
+
/// <reference path="../console.d.ts" />
|
|
9
|
+
/// <reference path="../constants.d.ts" />
|
|
10
|
+
/// <reference path="../crypto.d.ts" />
|
|
11
|
+
/// <reference path="../dgram.d.ts" />
|
|
12
|
+
/// <reference path="../dns.d.ts" />
|
|
13
|
+
/// <reference path="../domain.d.ts" />
|
|
14
|
+
/// <reference path="../events.d.ts" />
|
|
15
15
|
/// <reference path="fs.d.ts" />
|
|
16
|
-
/// <reference path="fs/promises.d.ts" />
|
|
17
|
-
/// <reference path="http.d.ts" />
|
|
18
|
-
/// <reference path="http2.d.ts" />
|
|
19
|
-
/// <reference path="https.d.ts" />
|
|
20
|
-
/// <reference path="inspector.d.ts" />
|
|
21
|
-
/// <reference path="module.d.ts" />
|
|
22
|
-
/// <reference path="net.d.ts" />
|
|
23
|
-
/// <reference path="os.d.ts" />
|
|
24
|
-
/// <reference path="path.d.ts" />
|
|
25
|
-
/// <reference path="perf_hooks.d.ts" />
|
|
16
|
+
/// <reference path="../fs/promises.d.ts" />
|
|
17
|
+
/// <reference path="../http.d.ts" />
|
|
18
|
+
/// <reference path="../http2.d.ts" />
|
|
19
|
+
/// <reference path="../https.d.ts" />
|
|
20
|
+
/// <reference path="../inspector.d.ts" />
|
|
21
|
+
/// <reference path="../module.d.ts" />
|
|
22
|
+
/// <reference path="../net.d.ts" />
|
|
23
|
+
/// <reference path="../os.d.ts" />
|
|
24
|
+
/// <reference path="../path.d.ts" />
|
|
25
|
+
/// <reference path="../perf_hooks.d.ts" />
|
|
26
26
|
/// <reference path="process.d.ts" />
|
|
27
|
-
/// <reference path="punycode.d.ts" />
|
|
28
|
-
/// <reference path="querystring.d.ts" />
|
|
29
|
-
/// <reference path="readline.d.ts" />
|
|
30
|
-
/// <reference path="repl.d.ts" />
|
|
31
|
-
/// <reference path="stream.d.ts" />
|
|
32
|
-
/// <reference path="string_decoder.d.ts" />
|
|
33
|
-
/// <reference path="timers.d.ts" />
|
|
34
|
-
/// <reference path="tls.d.ts" />
|
|
35
|
-
/// <reference path="trace_events.d.ts" />
|
|
36
|
-
/// <reference path="tty.d.ts" />
|
|
37
|
-
/// <reference path="url.d.ts" />
|
|
27
|
+
/// <reference path="../punycode.d.ts" />
|
|
28
|
+
/// <reference path="../querystring.d.ts" />
|
|
29
|
+
/// <reference path="../readline.d.ts" />
|
|
30
|
+
/// <reference path="../repl.d.ts" />
|
|
31
|
+
/// <reference path="../stream.d.ts" />
|
|
32
|
+
/// <reference path="../string_decoder.d.ts" />
|
|
33
|
+
/// <reference path="../timers.d.ts" />
|
|
34
|
+
/// <reference path="../tls.d.ts" />
|
|
35
|
+
/// <reference path="../trace_events.d.ts" />
|
|
36
|
+
/// <reference path="../tty.d.ts" />
|
|
37
|
+
/// <reference path="../url.d.ts" />
|
|
38
38
|
/// <reference path="util.d.ts" />
|
|
39
|
-
/// <reference path="v8.d.ts" />
|
|
40
|
-
/// <reference path="vm.d.ts" />
|
|
41
|
-
/// <reference path="worker_threads.d.ts" />
|
|
42
|
-
/// <reference path="zlib.d.ts" />
|
|
39
|
+
/// <reference path="../v8.d.ts" />
|
|
40
|
+
/// <reference path="../vm.d.ts" />
|
|
41
|
+
/// <reference path="../worker_threads.d.ts" />
|
|
42
|
+
/// <reference path="../zlib.d.ts" />
|
node/ts3.1/globals.d.ts
CHANGED
|
@@ -19,6 +19,11 @@ interface String {
|
|
|
19
19
|
trimLeft(): string;
|
|
20
20
|
/** Removes whitespace from the right end of a string. */
|
|
21
21
|
trimRight(): string;
|
|
22
|
+
|
|
23
|
+
/** Returns a copy with leading whitespace removed. */
|
|
24
|
+
trimStart(): string;
|
|
25
|
+
/** Returns a copy with trailing whitespace removed. */
|
|
26
|
+
trimEnd(): string;
|
|
22
27
|
}
|
|
23
28
|
|
|
24
29
|
interface ImportMeta {
|
|
@@ -571,7 +576,8 @@ declare namespace NodeJS {
|
|
|
571
576
|
id: string;
|
|
572
577
|
filename: string;
|
|
573
578
|
loaded: boolean;
|
|
574
|
-
|
|
579
|
+
/** @deprecated since 14.6.0 Please use `require.main` and `module.children` instead. */
|
|
580
|
+
parent: Module | null | undefined;
|
|
575
581
|
children: Module[];
|
|
576
582
|
/**
|
|
577
583
|
* @since 11.14.0
|
node/ts3.1/process.d.ts
CHANGED
|
@@ -245,6 +245,8 @@ declare module "process" {
|
|
|
245
245
|
title: string;
|
|
246
246
|
arch: string;
|
|
247
247
|
platform: Platform;
|
|
248
|
+
/** @deprecated since v14.0.0 - use `require.main` instead. */
|
|
249
|
+
mainModule?: Module;
|
|
248
250
|
memoryUsage(): MemoryUsage;
|
|
249
251
|
cpuUsage(previousValue?: CpuUsage): CpuUsage;
|
|
250
252
|
nextTick(callback: Function, ...args: any[]): void;
|
|
@@ -259,6 +261,12 @@ declare module "process" {
|
|
|
259
261
|
tls_ocsp: boolean;
|
|
260
262
|
tls: boolean;
|
|
261
263
|
};
|
|
264
|
+
/**
|
|
265
|
+
* @deprecated since v14.0.0 - Calling process.umask() with no argument causes
|
|
266
|
+
* the process-wide umask to be written twice. This introduces a race condition between threads,
|
|
267
|
+
* and is a potential security vulnerability. There is no safe, cross-platform alternative API.
|
|
268
|
+
*/
|
|
269
|
+
umask(): number;
|
|
262
270
|
/**
|
|
263
271
|
* Can only be set if not in worker thread.
|
|
264
272
|
*/
|
node/ts3.4/base.d.ts
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
/// <reference path="../ts3.1/base.d.ts" />
|
|
18
18
|
|
|
19
19
|
// TypeScript 3.2-specific augmentations:
|
|
20
|
-
/// <reference path="fs.d.ts" />
|
|
21
|
-
/// <reference path="process.d.ts" />
|
|
22
|
-
/// <reference path="util.d.ts" />
|
|
23
|
-
/// <reference path="globals.d.ts" />
|
|
20
|
+
/// <reference path="../fs.d.ts" />
|
|
21
|
+
/// <reference path="../process.d.ts" />
|
|
22
|
+
/// <reference path="../util.d.ts" />
|
|
23
|
+
/// <reference path="../globals.d.ts" />
|
node/ts3.6/base.d.ts
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
/// <reference path="../ts3.4/base.d.ts" />
|
|
18
18
|
|
|
19
19
|
// TypeScript 3.5-specific augmentations:
|
|
20
|
-
/// <reference path="globals.global.d.ts" />
|
|
20
|
+
/// <reference path="../globals.global.d.ts" />
|
|
21
21
|
|
|
22
22
|
// TypeScript 3.5-specific augmentations:
|
|
23
|
-
/// <reference path="wasi.d.ts" />
|
|
23
|
+
/// <reference path="../wasi.d.ts" />
|
node/{ts3.1/tty.d.ts → tty.d.ts}
RENAMED
|
File without changes
|
node/{ts3.1/url.d.ts → url.d.ts}
RENAMED
|
File without changes
|
/node/{ts3.1/v8.d.ts → v8.d.ts}
RENAMED
|
File without changes
|
/node/{ts3.1/vm.d.ts → vm.d.ts}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|