@types/node 14.6.4 → 14.10.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- node/README.md +2 -2
- 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} +6 -0
- 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.1/fs.d.ts → fs.d.ts} +24 -0
- node/{ts3.1/globals.d.ts → globals.d.ts} +15 -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 -8
- 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.1/process.d.ts → process.d.ts} +9 -0
- 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 → ts3.4}/assert.d.ts +0 -0
- node/ts3.4/base.d.ts +40 -7
- node/{ts3.1 → ts3.4}/globals.global.d.ts +0 -0
- node/ts3.4/index.d.ts +2 -6
- node/ts3.6/base.d.ts +2 -2
- node/ts3.6/index.d.ts +1 -1
- node/{ts3.1/tty.d.ts → tty.d.ts} +0 -0
- node/{ts3.1/url.d.ts → url.d.ts} +0 -0
- node/{ts3.1/util.d.ts → util.d.ts} +2 -0
- 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/ts3.1/base.d.ts +0 -42
- node/ts3.1/index.d.ts +0 -44
- node/ts3.4/fs.d.ts +0 -33
- node/ts3.4/globals.d.ts +0 -13
- node/ts3.4/process.d.ts +0 -12
- node/ts3.4/util.d.ts +0 -9
node/README.md
CHANGED
|
@@ -8,9 +8,9 @@ This package contains type definitions for Node.js (http://nodejs.org/).
|
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated:
|
|
11
|
+
* Last updated: Wed, 16 Sep 2020 21:15:52 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
|
-
* Global values: `Buffer`, `__dirname`, `__filename`, `clearImmediate`, `clearInterval`, `clearTimeout`, `console`, `exports`, `global`, `module`, `process`, `queueMicrotask`, `require`, `setImmediate`, `setInterval`, `setTimeout
|
|
13
|
+
* Global values: `Buffer`, `__dirname`, `__filename`, `clearImmediate`, `clearInterval`, `clearTimeout`, `console`, `exports`, `global`, `module`, `process`, `queueMicrotask`, `require`, `setImmediate`, `setInterval`, `setTimeout`
|
|
14
14
|
|
|
15
15
|
# Credits
|
|
16
16
|
These definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [DefinitelyTyped](https://github.com/DefinitelyTyped), [Alberto Schiabel](https://github.com/jkomyno), [Alexander T.](https://github.com/a-tarasyuk), [Alvis HT Tang](https://github.com/alvis), [Andrew Makarov](https://github.com/r3nya), [Benjamin Toueg](https://github.com/btoueg), [Bruno Scheufler](https://github.com/brunoscheufler), [Chigozirim C.](https://github.com/smac89), [David Junger](https://github.com/touffy), [Deividas Bakanas](https://github.com/DeividasBakanas), [Eugene Y. Q. Shen](https://github.com/eyqs), [Flarna](https://github.com/Flarna), [Hannes Magnusson](https://github.com/Hannes-Magnusson-CK), [Hoàng Văn Khải](https://github.com/KSXGitHub), [Huw](https://github.com/hoo29), [Kelvin Jin](https://github.com/kjin), [Klaus Meinhardt](https://github.com/ajafff), [Lishude](https://github.com/islishude), [Mariusz Wiktorczyk](https://github.com/mwiktorczyk), [Mohsen Azimi](https://github.com/mohsen1), [Nicolas Even](https://github.com/n-e), [Nikita Galkin](https://github.com/galkin), [Parambir Singh](https://github.com/parambirs), [Sebastian Silbermann](https://github.com/eps1lon), [Simon Schick](https://github.com/SimonSchick), [Thomas den Hollander](https://github.com/ThomasdenH), [Wilco Bakker](https://github.com/WilcoBakker), [wwwy3y3](https://github.com/wwwy3y3), [Samuel Ainsworth](https://github.com/samuela), [Kyle Uehlein](https://github.com/kuehlein), [Jordi Oliveras Rovira](https://github.com/j-oliveras), [Thanik Bhongbhibhat](https://github.com/bhongy), [Marcin Kopacz](https://github.com/chyzwar), [Trivikram Kamat](https://github.com/trivikr), [Minh Son Nguyen](https://github.com/nguymin4), [Junxiao Shi](https://github.com/yoursunny), [Ilia Baryshnikov](https://github.com/qwelias), [ExE Boss](https://github.com/ExE-Boss), [Surasak Chaisurin](https://github.com/Ryan-Willpower), [Piotr Błażejewicz](https://github.com/peterblazejewicz), [Anna Henningsen](https://github.com/addaleax), and [Jason Kwok](https://github.com/JasonHK).
|
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();
|
|
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.1/fs.d.ts → fs.d.ts}
RENAMED
|
@@ -503,6 +503,8 @@ declare module "fs" {
|
|
|
503
503
|
* Asynchronous stat(2) - Get file status.
|
|
504
504
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
505
505
|
*/
|
|
506
|
+
export function stat(path: PathLike, options: BigIntOptions, callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void): void;
|
|
507
|
+
export function stat(path: PathLike, options: StatOptions, callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void): void;
|
|
506
508
|
export function stat(path: PathLike, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void;
|
|
507
509
|
|
|
508
510
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
@@ -511,6 +513,8 @@ declare module "fs" {
|
|
|
511
513
|
* Asynchronous stat(2) - Get file status.
|
|
512
514
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
513
515
|
*/
|
|
516
|
+
function __promisify__(path: PathLike, options: BigIntOptions): Promise<BigIntStats>;
|
|
517
|
+
function __promisify__(path: PathLike, options: StatOptions): Promise<Stats | BigIntStats>;
|
|
514
518
|
function __promisify__(path: PathLike): Promise<Stats>;
|
|
515
519
|
}
|
|
516
520
|
|
|
@@ -518,6 +522,8 @@ declare module "fs" {
|
|
|
518
522
|
* Synchronous stat(2) - Get file status.
|
|
519
523
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
520
524
|
*/
|
|
525
|
+
export function statSync(path: PathLike, options: BigIntOptions): BigIntStats;
|
|
526
|
+
export function statSync(path: PathLike, options: StatOptions): Stats | BigIntStats;
|
|
521
527
|
export function statSync(path: PathLike): Stats;
|
|
522
528
|
|
|
523
529
|
/**
|
|
@@ -2129,4 +2135,22 @@ declare module "fs" {
|
|
|
2129
2135
|
export namespace opendir {
|
|
2130
2136
|
function __promisify__(path: string, options?: OpenDirOptions): Promise<Dir>;
|
|
2131
2137
|
}
|
|
2138
|
+
|
|
2139
|
+
export interface BigIntStats extends StatsBase<bigint> {
|
|
2140
|
+
}
|
|
2141
|
+
|
|
2142
|
+
export class BigIntStats {
|
|
2143
|
+
atimeNs: bigint;
|
|
2144
|
+
mtimeNs: bigint;
|
|
2145
|
+
ctimeNs: bigint;
|
|
2146
|
+
birthtimeNs: bigint;
|
|
2147
|
+
}
|
|
2148
|
+
|
|
2149
|
+
export interface BigIntOptions {
|
|
2150
|
+
bigint: true;
|
|
2151
|
+
}
|
|
2152
|
+
|
|
2153
|
+
export interface StatOptions {
|
|
2154
|
+
bigint: boolean;
|
|
2155
|
+
}
|
|
2132
2156
|
}
|
|
@@ -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 {
|
|
@@ -251,10 +256,18 @@ declare class Buffer extends Uint8Array {
|
|
|
251
256
|
* @param end Where the new `Buffer` will end (not inclusive). Default: `buf.length`.
|
|
252
257
|
*/
|
|
253
258
|
subarray(begin?: number, end?: number): Buffer;
|
|
259
|
+
writeBigInt64BE(value: bigint, offset?: number): number;
|
|
260
|
+
writeBigInt64LE(value: bigint, offset?: number): number;
|
|
261
|
+
writeBigUInt64BE(value: bigint, offset?: number): number;
|
|
262
|
+
writeBigUInt64LE(value: bigint, offset?: number): number;
|
|
254
263
|
writeUIntLE(value: number, offset: number, byteLength: number): number;
|
|
255
264
|
writeUIntBE(value: number, offset: number, byteLength: number): number;
|
|
256
265
|
writeIntLE(value: number, offset: number, byteLength: number): number;
|
|
257
266
|
writeIntBE(value: number, offset: number, byteLength: number): number;
|
|
267
|
+
readBigUInt64BE(offset?: number): bigint;
|
|
268
|
+
readBigUInt64LE(offset?: number): bigint;
|
|
269
|
+
readBigInt64BE(offset?: number): bigint;
|
|
270
|
+
readBigInt64LE(offset?: number): bigint;
|
|
258
271
|
readUIntLE(offset: number, byteLength: number): number;
|
|
259
272
|
readUIntBE(offset: number, byteLength: number): number;
|
|
260
273
|
readIntLE(offset: number, byteLength: number): number;
|
|
@@ -571,7 +584,8 @@ declare namespace NodeJS {
|
|
|
571
584
|
id: string;
|
|
572
585
|
filename: string;
|
|
573
586
|
loaded: boolean;
|
|
574
|
-
|
|
587
|
+
/** @deprecated since 14.6.0 Please use `require.main` and `module.children` instead. */
|
|
588
|
+
parent: Module | null | undefined;
|
|
575
589
|
children: Module[];
|
|
576
590
|
/**
|
|
577
591
|
* @since 11.14.0
|
|
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.3",
|
|
4
4
|
"description": "TypeScript definitions for Node.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"contributors": [
|
|
@@ -223,11 +223,6 @@
|
|
|
223
223
|
"main": "",
|
|
224
224
|
"types": "index.d.ts",
|
|
225
225
|
"typesVersions": {
|
|
226
|
-
"<=3.1": {
|
|
227
|
-
"*": [
|
|
228
|
-
"ts3.1/*"
|
|
229
|
-
]
|
|
230
|
-
},
|
|
231
226
|
"<=3.4": {
|
|
232
227
|
"*": [
|
|
233
228
|
"ts3.4/*"
|
|
@@ -246,6 +241,6 @@
|
|
|
246
241
|
},
|
|
247
242
|
"scripts": {},
|
|
248
243
|
"dependencies": {},
|
|
249
|
-
"typesPublisherContentHash": "
|
|
250
|
-
"typeScriptVersion": "3.
|
|
244
|
+
"typesPublisherContentHash": "bb347be5f56fa75f424ec3e6e883d759d5816d8151785abfd906921917ce173b",
|
|
245
|
+
"typeScriptVersion": "3.2"
|
|
251
246
|
}
|
|
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 {
|
|
@@ -84,6 +84,7 @@ declare module "process" {
|
|
|
84
84
|
|
|
85
85
|
interface HRTime {
|
|
86
86
|
(time?: [number, number]): [number, number];
|
|
87
|
+
bigint(): bigint;
|
|
87
88
|
}
|
|
88
89
|
|
|
89
90
|
interface ProcessReport {
|
|
@@ -245,6 +246,8 @@ declare module "process" {
|
|
|
245
246
|
title: string;
|
|
246
247
|
arch: string;
|
|
247
248
|
platform: Platform;
|
|
249
|
+
/** @deprecated since v14.0.0 - use `require.main` instead. */
|
|
250
|
+
mainModule?: Module;
|
|
248
251
|
memoryUsage(): MemoryUsage;
|
|
249
252
|
cpuUsage(previousValue?: CpuUsage): CpuUsage;
|
|
250
253
|
nextTick(callback: Function, ...args: any[]): void;
|
|
@@ -259,6 +262,12 @@ declare module "process" {
|
|
|
259
262
|
tls_ocsp: boolean;
|
|
260
263
|
tls: boolean;
|
|
261
264
|
};
|
|
265
|
+
/**
|
|
266
|
+
* @deprecated since v14.0.0 - Calling process.umask() with no argument causes
|
|
267
|
+
* the process-wide umask to be written twice. This introduces a race condition between threads,
|
|
268
|
+
* and is a potential security vulnerability. There is no safe, cross-platform alternative API.
|
|
269
|
+
*/
|
|
270
|
+
umask(): number;
|
|
262
271
|
/**
|
|
263
272
|
* Can only be set if not in worker thread.
|
|
264
273
|
*/
|
|
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 → ts3.4}/assert.d.ts
RENAMED
|
File without changes
|
node/ts3.4/base.d.ts
CHANGED
|
@@ -13,11 +13,44 @@
|
|
|
13
13
|
/// <reference lib="esnext.bigint" />
|
|
14
14
|
|
|
15
15
|
// Base definitions for all NodeJS modules that are not specific to any version of TypeScript:
|
|
16
|
-
// tslint:disable-next-line:no-bad-reference
|
|
17
|
-
/// <reference path="../ts3.1/base.d.ts" />
|
|
18
16
|
|
|
19
|
-
|
|
20
|
-
/// <reference path="
|
|
21
|
-
/// <reference path="
|
|
22
|
-
/// <reference path="
|
|
23
|
-
/// <reference path="
|
|
17
|
+
/// <reference path="../globals.d.ts" />
|
|
18
|
+
/// <reference path="../async_hooks.d.ts" />
|
|
19
|
+
/// <reference path="../buffer.d.ts" />
|
|
20
|
+
/// <reference path="../child_process.d.ts" />
|
|
21
|
+
/// <reference path="../cluster.d.ts" />
|
|
22
|
+
/// <reference path="../console.d.ts" />
|
|
23
|
+
/// <reference path="../constants.d.ts" />
|
|
24
|
+
/// <reference path="../crypto.d.ts" />
|
|
25
|
+
/// <reference path="../dgram.d.ts" />
|
|
26
|
+
/// <reference path="../dns.d.ts" />
|
|
27
|
+
/// <reference path="../domain.d.ts" />
|
|
28
|
+
/// <reference path="../events.d.ts" />
|
|
29
|
+
/// <reference path="../fs.d.ts" />
|
|
30
|
+
/// <reference path="../fs/promises.d.ts" />
|
|
31
|
+
/// <reference path="../http.d.ts" />
|
|
32
|
+
/// <reference path="../http2.d.ts" />
|
|
33
|
+
/// <reference path="../https.d.ts" />
|
|
34
|
+
/// <reference path="../inspector.d.ts" />
|
|
35
|
+
/// <reference path="../module.d.ts" />
|
|
36
|
+
/// <reference path="../net.d.ts" />
|
|
37
|
+
/// <reference path="../os.d.ts" />
|
|
38
|
+
/// <reference path="../path.d.ts" />
|
|
39
|
+
/// <reference path="../perf_hooks.d.ts" />
|
|
40
|
+
/// <reference path="../process.d.ts" />
|
|
41
|
+
/// <reference path="../punycode.d.ts" />
|
|
42
|
+
/// <reference path="../querystring.d.ts" />
|
|
43
|
+
/// <reference path="../readline.d.ts" />
|
|
44
|
+
/// <reference path="../repl.d.ts" />
|
|
45
|
+
/// <reference path="../stream.d.ts" />
|
|
46
|
+
/// <reference path="../string_decoder.d.ts" />
|
|
47
|
+
/// <reference path="../timers.d.ts" />
|
|
48
|
+
/// <reference path="../tls.d.ts" />
|
|
49
|
+
/// <reference path="../trace_events.d.ts" />
|
|
50
|
+
/// <reference path="../tty.d.ts" />
|
|
51
|
+
/// <reference path="../url.d.ts" />
|
|
52
|
+
/// <reference path="../util.d.ts" />
|
|
53
|
+
/// <reference path="../v8.d.ts" />
|
|
54
|
+
/// <reference path="../vm.d.ts" />
|
|
55
|
+
/// <reference path="../worker_threads.d.ts" />
|
|
56
|
+
/// <reference path="../zlib.d.ts" />
|
|
File without changes
|
node/ts3.4/index.d.ts
CHANGED
|
@@ -4,9 +4,5 @@
|
|
|
4
4
|
// Typically type modifiations should be made in base.d.ts instead of here
|
|
5
5
|
|
|
6
6
|
/// <reference path="base.d.ts" />
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
/// <reference path="../ts3.1/assert.d.ts" />
|
|
10
|
-
|
|
11
|
-
// tslint:disable-next-line:no-bad-reference
|
|
12
|
-
/// <reference path="../ts3.1/globals.global.d.ts" />
|
|
7
|
+
/// <reference path="assert.d.ts" />
|
|
8
|
+
/// <reference path="globals.global.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.6/index.d.ts
CHANGED
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
|
|
@@ -125,6 +125,8 @@ declare module "util" {
|
|
|
125
125
|
function isArrayBuffer(object: any): object is ArrayBuffer;
|
|
126
126
|
function isArrayBufferView(object: any): object is ArrayBufferView;
|
|
127
127
|
function isAsyncFunction(object: any): boolean;
|
|
128
|
+
function isBigInt64Array(value: any): value is BigInt64Array;
|
|
129
|
+
function isBigUint64Array(value: any): value is BigUint64Array;
|
|
128
130
|
function isBooleanObject(object: any): object is Boolean;
|
|
129
131
|
function isBoxedPrimitive(object: any): object is (Number | Boolean | String | Symbol /* | Object(BigInt) | Object(Symbol) */);
|
|
130
132
|
function isDataView(object: any): object is DataView;
|
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
|
node/ts3.1/base.d.ts
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
// base definitions for all NodeJS modules that are not specific to any version of TypeScript
|
|
2
|
-
|
|
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" />
|
|
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" />
|
|
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" />
|
|
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" />
|
node/ts3.1/index.d.ts
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
// NOTE: These definitions support NodeJS and TypeScript 3.1.
|
|
2
|
-
|
|
3
|
-
// NOTE: TypeScript version-specific augmentations can be found in the following paths:
|
|
4
|
-
// - ~/base.d.ts - Shared definitions common to all TypeScript versions
|
|
5
|
-
// - ~/index.d.ts - Definitions specific to TypeScript 2.8
|
|
6
|
-
// - ~/ts3.5/index.d.ts - Definitions specific to TypeScript 3.5
|
|
7
|
-
|
|
8
|
-
// NOTE: Augmentations for TypeScript 3.5 and later should use individual files for overrides
|
|
9
|
-
// within the respective ~/ts3.5 (or later) folder. However, this is disallowed for versions
|
|
10
|
-
// prior to TypeScript 3.5, so the older definitions will be found here.
|
|
11
|
-
|
|
12
|
-
// Base definitions for all NodeJS modules that are not specific to any version of TypeScript:
|
|
13
|
-
/// <reference path="base.d.ts" />
|
|
14
|
-
|
|
15
|
-
// We can't include globals.global.d.ts in globals.d.ts, as it'll cause duplication errors in TypeScript 3.5+
|
|
16
|
-
/// <reference path="globals.global.d.ts" />
|
|
17
|
-
|
|
18
|
-
// We can't include assert.d.ts in base.d.ts, as it'll cause duplication errors in TypeScript 3.7+
|
|
19
|
-
/// <reference path="assert.d.ts" />
|
|
20
|
-
|
|
21
|
-
// Forward-declarations for needed types from es2015 and later (in case users are using `--lib es5`)
|
|
22
|
-
// Empty interfaces are used here which merge fine with the real declarations in the lib XXX files
|
|
23
|
-
// just to ensure the names are known and node typings can be used without importing these libs.
|
|
24
|
-
// if someone really needs these types the libs need to be added via --lib or in tsconfig.json
|
|
25
|
-
interface AsyncIterable<T> { }
|
|
26
|
-
interface IterableIterator<T> { }
|
|
27
|
-
interface AsyncIterableIterator<T> {}
|
|
28
|
-
interface SymbolConstructor {
|
|
29
|
-
readonly asyncIterator: symbol;
|
|
30
|
-
}
|
|
31
|
-
declare var Symbol: SymbolConstructor;
|
|
32
|
-
// even this is just a forward declaration some properties are added otherwise
|
|
33
|
-
// it would be allowed to pass anything to e.g. Buffer.from()
|
|
34
|
-
interface SharedArrayBuffer {
|
|
35
|
-
readonly byteLength: number;
|
|
36
|
-
slice(begin?: number, end?: number): SharedArrayBuffer;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
declare module "util" {
|
|
40
|
-
namespace types {
|
|
41
|
-
function isBigInt64Array(value: any): boolean;
|
|
42
|
-
function isBigUint64Array(value: any): boolean;
|
|
43
|
-
}
|
|
44
|
-
}
|
node/ts3.4/fs.d.ts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
// tslint:disable-next-line:no-bad-reference
|
|
2
|
-
/// <reference path="../ts3.1/fs.d.ts" />
|
|
3
|
-
|
|
4
|
-
declare module 'fs' {
|
|
5
|
-
interface BigIntStats extends StatsBase<bigint> {
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
class BigIntStats {
|
|
9
|
-
atimeNs: bigint;
|
|
10
|
-
mtimeNs: bigint;
|
|
11
|
-
ctimeNs: bigint;
|
|
12
|
-
birthtimeNs: bigint;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
interface BigIntOptions {
|
|
16
|
-
bigint: true;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
interface StatOptions {
|
|
20
|
-
bigint: boolean;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
function stat(path: PathLike, options: BigIntOptions, callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void): void;
|
|
24
|
-
function stat(path: PathLike, options: StatOptions, callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void): void;
|
|
25
|
-
|
|
26
|
-
namespace stat {
|
|
27
|
-
function __promisify__(path: PathLike, options: BigIntOptions): Promise<BigIntStats>;
|
|
28
|
-
function __promisify__(path: PathLike, options: StatOptions): Promise<Stats | BigIntStats>;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
function statSync(path: PathLike, options: BigIntOptions): BigIntStats;
|
|
32
|
-
function statSync(path: PathLike, options: StatOptions): Stats | BigIntStats;
|
|
33
|
-
}
|
node/ts3.4/globals.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
// tslint:disable-next-line:no-bad-reference
|
|
2
|
-
/// <reference path="../ts3.1/globals.d.ts" />
|
|
3
|
-
|
|
4
|
-
interface Buffer extends Uint8Array {
|
|
5
|
-
readBigUInt64BE(offset?: number): bigint;
|
|
6
|
-
readBigUInt64LE(offset?: number): bigint;
|
|
7
|
-
readBigInt64BE(offset?: number): bigint;
|
|
8
|
-
readBigInt64LE(offset?: number): bigint;
|
|
9
|
-
writeBigInt64BE(value: bigint, offset?: number): number;
|
|
10
|
-
writeBigInt64LE(value: bigint, offset?: number): number;
|
|
11
|
-
writeBigUInt64BE(value: bigint, offset?: number): number;
|
|
12
|
-
writeBigUInt64LE(value: bigint, offset?: number): number;
|
|
13
|
-
}
|
node/ts3.4/process.d.ts
DELETED
node/ts3.4/util.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
// tslint:disable-next-line:no-bad-reference
|
|
2
|
-
/// <reference path="../ts3.1/util.d.ts" />
|
|
3
|
-
|
|
4
|
-
declare module "util" {
|
|
5
|
-
namespace types {
|
|
6
|
-
function isBigInt64Array(value: any): value is BigInt64Array;
|
|
7
|
-
function isBigUint64Array(value: any): value is BigUint64Array;
|
|
8
|
-
}
|
|
9
|
-
}
|