@types/node 14.14.28 → 14.14.32
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/fs/promises.d.ts +11 -9
- node/fs.d.ts +28 -13
- node/globals.d.ts +5 -5
- node/index.d.ts +0 -2
- node/package.json +3 -13
- node/timers.d.ts +2 -2
- node/vm.d.ts +2 -0
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: Sun,
|
|
11
|
+
* Last updated: Sun, 07 Mar 2021 09:57:56 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
|
|
|
15
15
|
# Credits
|
|
16
|
-
These definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [DefinitelyTyped](https://github.com/DefinitelyTyped), [Alberto Schiabel](https://github.com/jkomyno), [
|
|
16
|
+
These definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [DefinitelyTyped](https://github.com/DefinitelyTyped), [Alberto Schiabel](https://github.com/jkomyno), [Alvis HT Tang](https://github.com/alvis), [Andrew Makarov](https://github.com/r3nya), [Benjamin Toueg](https://github.com/btoueg), [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), [Hannes Magnusson](https://github.com/Hannes-Magnusson-CK), [Hoàng Văn Khải](https://github.com/KSXGitHub), [Huw](https://github.com/hoo29), [Kelvin Jin](https://github.com/kjin), [Klaus Meinhardt](https://github.com/ajafff), [Lishude](https://github.com/islishude), [Mariusz Wiktorczyk](https://github.com/mwiktorczyk), [Mohsen Azimi](https://github.com/mohsen1), [Nicolas Even](https://github.com/n-e), [Nikita Galkin](https://github.com/galkin), [Parambir Singh](https://github.com/parambirs), [Sebastian Silbermann](https://github.com/eps1lon), [Simon Schick](https://github.com/SimonSchick), [Thomas den Hollander](https://github.com/ThomasdenH), [Wilco Bakker](https://github.com/WilcoBakker), [wwwy3y3](https://github.com/wwwy3y3), [Samuel Ainsworth](https://github.com/samuela), [Kyle Uehlein](https://github.com/kuehlein), [Thanik Bhongbhibhat](https://github.com/bhongy), [Marcin Kopacz](https://github.com/chyzwar), [Trivikram Kamat](https://github.com/trivikr), [Minh Son Nguyen](https://github.com/nguymin4), [Junxiao Shi](https://github.com/yoursunny), [Ilia Baryshnikov](https://github.com/qwelias), [ExE Boss](https://github.com/ExE-Boss), [Surasak Chaisurin](https://github.com/Ryan-Willpower), [Piotr Błażejewicz](https://github.com/peterblazejewicz), [Anna Henningsen](https://github.com/addaleax), [Jason Kwok](https://github.com/JasonHK), [Victor Perin](https://github.com/victorperin), and [Yongsheng Zhang](https://github.com/ZYSzys).
|
node/fs/promises.d.ts
CHANGED
|
@@ -5,6 +5,8 @@ declare module 'fs/promises' {
|
|
|
5
5
|
declare module 'node:fs/promises' {
|
|
6
6
|
import {
|
|
7
7
|
Stats,
|
|
8
|
+
BigIntStats,
|
|
9
|
+
StatOptions,
|
|
8
10
|
WriteVResult,
|
|
9
11
|
ReadVResult,
|
|
10
12
|
PathLike,
|
|
@@ -96,7 +98,9 @@ declare module 'node:fs/promises' {
|
|
|
96
98
|
/**
|
|
97
99
|
* Asynchronous fstat(2) - Get file status.
|
|
98
100
|
*/
|
|
99
|
-
stat(): Promise<Stats>;
|
|
101
|
+
stat(opts?: StatOptions & { bigint?: false }): Promise<Stats>;
|
|
102
|
+
stat(opts: StatOptions & { bigint: true }): Promise<BigIntStats>;
|
|
103
|
+
stat(opts?: StatOptions): Promise<Stats | BigIntStats>;
|
|
100
104
|
|
|
101
105
|
/**
|
|
102
106
|
* Asynchronous ftruncate(2) - Truncate a file to a specified length.
|
|
@@ -361,23 +365,21 @@ declare module 'node:fs/promises' {
|
|
|
361
365
|
*/
|
|
362
366
|
function symlink(target: PathLike, path: PathLike, type?: string | null): Promise<void>;
|
|
363
367
|
|
|
364
|
-
/**
|
|
365
|
-
* Asynchronous fstat(2) - Get file status.
|
|
366
|
-
* @param handle A `FileHandle`.
|
|
367
|
-
*/
|
|
368
|
-
function fstat(handle: FileHandle): Promise<Stats>;
|
|
369
|
-
|
|
370
368
|
/**
|
|
371
369
|
* Asynchronous lstat(2) - Get file status. Does not dereference symbolic links.
|
|
372
370
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
373
371
|
*/
|
|
374
|
-
function lstat(path: PathLike): Promise<Stats>;
|
|
372
|
+
function lstat(path: PathLike, opts?: StatOptions & { bigint?: false }): Promise<Stats>;
|
|
373
|
+
function lstat(path: PathLike, opts: StatOptions & { bigint: true }): Promise<BigIntStats>;
|
|
374
|
+
function lstat(path: PathLike, opts?: StatOptions): Promise<Stats | BigIntStats>;
|
|
375
375
|
|
|
376
376
|
/**
|
|
377
377
|
* Asynchronous stat(2) - Get file status.
|
|
378
378
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
379
379
|
*/
|
|
380
|
-
function stat(path: PathLike): Promise<Stats>;
|
|
380
|
+
function stat(path: PathLike, opts?: StatOptions & { bigint?: false }): Promise<Stats>;
|
|
381
|
+
function stat(path: PathLike, opts: StatOptions & { bigint: true }): Promise<BigIntStats>;
|
|
382
|
+
function stat(path: PathLike, opts?: StatOptions): Promise<Stats | BigIntStats>;
|
|
381
383
|
|
|
382
384
|
/**
|
|
383
385
|
* Asynchronous link(2) - Create a new link (also known as a hard link) to an existing file.
|
node/fs.d.ts
CHANGED
|
@@ -540,9 +540,10 @@ declare module 'fs' {
|
|
|
540
540
|
* Asynchronous stat(2) - Get file status.
|
|
541
541
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
542
542
|
*/
|
|
543
|
-
export function stat(path: PathLike, options: BigIntOptions, callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void): void;
|
|
544
|
-
export function stat(path: PathLike, options: StatOptions, callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void): void;
|
|
545
543
|
export function stat(path: PathLike, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void;
|
|
544
|
+
export function stat(path: PathLike, options: StatOptions & { bigint?: false } | undefined, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void;
|
|
545
|
+
export function stat(path: PathLike, options: StatOptions & { bigint: true }, callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void): void;
|
|
546
|
+
export function stat(path: PathLike, options: StatOptions | undefined, callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void): void;
|
|
546
547
|
|
|
547
548
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
548
549
|
export namespace stat {
|
|
@@ -550,24 +551,27 @@ declare module 'fs' {
|
|
|
550
551
|
* Asynchronous stat(2) - Get file status.
|
|
551
552
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
552
553
|
*/
|
|
553
|
-
function __promisify__(path: PathLike, options
|
|
554
|
-
function __promisify__(path: PathLike, options: StatOptions): Promise<
|
|
555
|
-
function __promisify__(path: PathLike): Promise<Stats>;
|
|
554
|
+
function __promisify__(path: PathLike, options?: StatOptions & { bigint?: false }): Promise<Stats>;
|
|
555
|
+
function __promisify__(path: PathLike, options: StatOptions & { bigint: true }): Promise<BigIntStats>;
|
|
556
|
+
function __promisify__(path: PathLike, options?: StatOptions): Promise<Stats | BigIntStats>;
|
|
556
557
|
}
|
|
557
558
|
|
|
558
559
|
/**
|
|
559
560
|
* Synchronous stat(2) - Get file status.
|
|
560
561
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
561
562
|
*/
|
|
562
|
-
export function statSync(path: PathLike, options
|
|
563
|
-
export function statSync(path: PathLike, options: StatOptions
|
|
564
|
-
export function statSync(path: PathLike): Stats;
|
|
563
|
+
export function statSync(path: PathLike, options?: StatOptions & { bigint?: false }): Stats;
|
|
564
|
+
export function statSync(path: PathLike, options: StatOptions & { bigint: true }): BigIntStats;
|
|
565
|
+
export function statSync(path: PathLike, options?: StatOptions): Stats | BigIntStats;
|
|
565
566
|
|
|
566
567
|
/**
|
|
567
568
|
* Asynchronous fstat(2) - Get file status.
|
|
568
569
|
* @param fd A file descriptor.
|
|
569
570
|
*/
|
|
570
571
|
export function fstat(fd: number, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void;
|
|
572
|
+
export function fstat(fd: number, options: StatOptions & { bigint?: false } | undefined, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void;
|
|
573
|
+
export function fstat(fd: number, options: StatOptions & { bigint: true }, callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void): void;
|
|
574
|
+
export function fstat(fd: number, options: StatOptions | undefined, callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void): void;
|
|
571
575
|
|
|
572
576
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
573
577
|
export namespace fstat {
|
|
@@ -575,20 +579,27 @@ declare module 'fs' {
|
|
|
575
579
|
* Asynchronous fstat(2) - Get file status.
|
|
576
580
|
* @param fd A file descriptor.
|
|
577
581
|
*/
|
|
578
|
-
function __promisify__(fd: number): Promise<Stats>;
|
|
582
|
+
function __promisify__(fd: number, options?: StatOptions & { bigint?: false }): Promise<Stats>;
|
|
583
|
+
function __promisify__(fd: number, options: StatOptions & { bigint: true }): Promise<BigIntStats>;
|
|
584
|
+
function __promisify__(fd: number, options?: StatOptions): Promise<Stats | BigIntStats>;
|
|
579
585
|
}
|
|
580
586
|
|
|
581
587
|
/**
|
|
582
588
|
* Synchronous fstat(2) - Get file status.
|
|
583
589
|
* @param fd A file descriptor.
|
|
584
590
|
*/
|
|
585
|
-
export function fstatSync(fd: number): Stats;
|
|
591
|
+
export function fstatSync(fd: number, options?: StatOptions & { bigint?: false }): Stats;
|
|
592
|
+
export function fstatSync(fd: number, options: StatOptions & { bigint: true }): BigIntStats;
|
|
593
|
+
export function fstatSync(fd: number, options?: StatOptions): Stats | BigIntStats;
|
|
586
594
|
|
|
587
595
|
/**
|
|
588
596
|
* Asynchronous lstat(2) - Get file status. Does not dereference symbolic links.
|
|
589
597
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
590
598
|
*/
|
|
591
599
|
export function lstat(path: PathLike, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void;
|
|
600
|
+
export function lstat(path: PathLike, options: StatOptions & { bigint?: false } | undefined, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void;
|
|
601
|
+
export function lstat(path: PathLike, options: StatOptions & { bigint: true }, callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void): void;
|
|
602
|
+
export function lstat(path: PathLike, options: StatOptions | undefined, callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void): void;
|
|
592
603
|
|
|
593
604
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
594
605
|
export namespace lstat {
|
|
@@ -596,14 +607,18 @@ declare module 'fs' {
|
|
|
596
607
|
* Asynchronous lstat(2) - Get file status. Does not dereference symbolic links.
|
|
597
608
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
598
609
|
*/
|
|
599
|
-
function __promisify__(path: PathLike): Promise<Stats>;
|
|
610
|
+
function __promisify__(path: PathLike, options?: StatOptions & { bigint?: false }): Promise<Stats>;
|
|
611
|
+
function __promisify__(path: PathLike, options: StatOptions & { bigint: true }): Promise<BigIntStats>;
|
|
612
|
+
function __promisify__(path: PathLike, options?: StatOptions): Promise<Stats | BigIntStats>;
|
|
600
613
|
}
|
|
601
614
|
|
|
602
615
|
/**
|
|
603
616
|
* Synchronous lstat(2) - Get file status. Does not dereference symbolic links.
|
|
604
617
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
605
618
|
*/
|
|
606
|
-
export function lstatSync(path: PathLike): Stats;
|
|
619
|
+
export function lstatSync(path: PathLike, options?: StatOptions & { bigint?: false }): Stats;
|
|
620
|
+
export function lstatSync(path: PathLike, options: StatOptions & { bigint: true }): BigIntStats;
|
|
621
|
+
export function lstatSync(path: PathLike, options?: StatOptions): Stats | BigIntStats;
|
|
607
622
|
|
|
608
623
|
/**
|
|
609
624
|
* Asynchronous link(2) - Create a new link (also known as a hard link) to an existing file.
|
|
@@ -2242,6 +2257,6 @@ declare module 'fs' {
|
|
|
2242
2257
|
}
|
|
2243
2258
|
|
|
2244
2259
|
export interface StatOptions {
|
|
2245
|
-
bigint
|
|
2260
|
+
bigint?: boolean;
|
|
2246
2261
|
}
|
|
2247
2262
|
}
|
node/globals.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ interface ErrorConstructor {
|
|
|
6
6
|
/**
|
|
7
7
|
* Optional override for formatting stack traces
|
|
8
8
|
*
|
|
9
|
-
* @see https://
|
|
9
|
+
* @see https://v8.dev/docs/stack-trace-api#customizing-stack-traces
|
|
10
10
|
*/
|
|
11
11
|
prepareStackTrace?: (err: Error, stackTraces: NodeJS.CallSite[]) => any;
|
|
12
12
|
|
|
@@ -47,13 +47,13 @@ declare var console: Console;
|
|
|
47
47
|
declare var __filename: string;
|
|
48
48
|
declare var __dirname: string;
|
|
49
49
|
|
|
50
|
-
declare function setTimeout(callback: (...args: any[]) => void, ms
|
|
50
|
+
declare function setTimeout(callback: (...args: any[]) => void, ms?: number, ...args: any[]): NodeJS.Timeout;
|
|
51
51
|
declare namespace setTimeout {
|
|
52
52
|
function __promisify__(ms: number): Promise<void>;
|
|
53
53
|
function __promisify__<T>(ms: number, value: T): Promise<T>;
|
|
54
54
|
}
|
|
55
55
|
declare function clearTimeout(timeoutId: NodeJS.Timeout): void;
|
|
56
|
-
declare function setInterval(callback: (...args: any[]) => void, ms
|
|
56
|
+
declare function setInterval(callback: (...args: any[]) => void, ms?: number, ...args: any[]): NodeJS.Timeout;
|
|
57
57
|
declare function clearInterval(intervalId: NodeJS.Timeout): void;
|
|
58
58
|
declare function setImmediate(callback: (...args: any[]) => void, ...args: any[]): NodeJS.Immediate;
|
|
59
59
|
declare namespace setImmediate {
|
|
@@ -519,8 +519,8 @@ declare namespace NodeJS {
|
|
|
519
519
|
parseFloat: typeof parseFloat;
|
|
520
520
|
parseInt: typeof parseInt;
|
|
521
521
|
setImmediate: (callback: (...args: any[]) => void, ...args: any[]) => Immediate;
|
|
522
|
-
setInterval: (callback: (...args: any[]) => void, ms
|
|
523
|
-
setTimeout: (callback: (...args: any[]) => void, ms
|
|
522
|
+
setInterval: (callback: (...args: any[]) => void, ms?: number, ...args: any[]) => Timeout;
|
|
523
|
+
setTimeout: (callback: (...args: any[]) => void, ms?: number, ...args: any[]) => Timeout;
|
|
524
524
|
queueMicrotask: typeof queueMicrotask;
|
|
525
525
|
undefined: typeof undefined;
|
|
526
526
|
unescape: (str: string) => string;
|
node/index.d.ts
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
// Definitions by: Microsoft TypeScript <https://github.com/Microsoft>
|
|
4
4
|
// DefinitelyTyped <https://github.com/DefinitelyTyped>
|
|
5
5
|
// Alberto Schiabel <https://github.com/jkomyno>
|
|
6
|
-
// Alexander T. <https://github.com/a-tarasyuk>
|
|
7
6
|
// Alvis HT Tang <https://github.com/alvis>
|
|
8
7
|
// Andrew Makarov <https://github.com/r3nya>
|
|
9
8
|
// Benjamin Toueg <https://github.com/btoueg>
|
|
@@ -30,7 +29,6 @@
|
|
|
30
29
|
// wwwy3y3 <https://github.com/wwwy3y3>
|
|
31
30
|
// Samuel Ainsworth <https://github.com/samuela>
|
|
32
31
|
// Kyle Uehlein <https://github.com/kuehlein>
|
|
33
|
-
// Jordi Oliveras Rovira <https://github.com/j-oliveras>
|
|
34
32
|
// Thanik Bhongbhibhat <https://github.com/bhongy>
|
|
35
33
|
// Marcin Kopacz <https://github.com/chyzwar>
|
|
36
34
|
// Trivikram Kamat <https://github.com/trivikr>
|
node/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "14.14.
|
|
3
|
+
"version": "14.14.32",
|
|
4
4
|
"description": "TypeScript definitions for Node.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"contributors": [
|
|
@@ -19,11 +19,6 @@
|
|
|
19
19
|
"url": "https://github.com/jkomyno",
|
|
20
20
|
"githubUsername": "jkomyno"
|
|
21
21
|
},
|
|
22
|
-
{
|
|
23
|
-
"name": "Alexander T.",
|
|
24
|
-
"url": "https://github.com/a-tarasyuk",
|
|
25
|
-
"githubUsername": "a-tarasyuk"
|
|
26
|
-
},
|
|
27
22
|
{
|
|
28
23
|
"name": "Alvis HT Tang",
|
|
29
24
|
"url": "https://github.com/alvis",
|
|
@@ -154,11 +149,6 @@
|
|
|
154
149
|
"url": "https://github.com/kuehlein",
|
|
155
150
|
"githubUsername": "kuehlein"
|
|
156
151
|
},
|
|
157
|
-
{
|
|
158
|
-
"name": "Jordi Oliveras Rovira",
|
|
159
|
-
"url": "https://github.com/j-oliveras",
|
|
160
|
-
"githubUsername": "j-oliveras"
|
|
161
|
-
},
|
|
162
152
|
{
|
|
163
153
|
"name": "Thanik Bhongbhibhat",
|
|
164
154
|
"url": "https://github.com/bhongy",
|
|
@@ -246,6 +236,6 @@
|
|
|
246
236
|
},
|
|
247
237
|
"scripts": {},
|
|
248
238
|
"dependencies": {},
|
|
249
|
-
"typesPublisherContentHash": "
|
|
250
|
-
"typeScriptVersion": "3.
|
|
239
|
+
"typesPublisherContentHash": "737cc4b46a32b367e6f088615ccfbee2704a03f69b0b16d8c113c02b22bb5e29",
|
|
240
|
+
"typeScriptVersion": "3.5"
|
|
251
241
|
}
|
node/timers.d.ts
CHANGED
|
@@ -3,13 +3,13 @@ declare module 'node:timers' {
|
|
|
3
3
|
}
|
|
4
4
|
|
|
5
5
|
declare module 'timers' {
|
|
6
|
-
function setTimeout(callback: (...args: any[]) => void, ms
|
|
6
|
+
function setTimeout(callback: (...args: any[]) => void, ms?: number, ...args: any[]): NodeJS.Timeout;
|
|
7
7
|
namespace setTimeout {
|
|
8
8
|
function __promisify__(ms: number): Promise<void>;
|
|
9
9
|
function __promisify__<T>(ms: number, value: T): Promise<T>;
|
|
10
10
|
}
|
|
11
11
|
function clearTimeout(timeoutId: NodeJS.Timeout): void;
|
|
12
|
-
function setInterval(callback: (...args: any[]) => void, ms
|
|
12
|
+
function setInterval(callback: (...args: any[]) => void, ms?: number, ...args: any[]): NodeJS.Timeout;
|
|
13
13
|
function clearInterval(intervalId: NodeJS.Timeout): void;
|
|
14
14
|
function setImmediate(callback: (...args: any[]) => void, ...args: any[]): NodeJS.Immediate;
|
|
15
15
|
namespace setImmediate {
|
node/vm.d.ts
CHANGED
|
@@ -25,6 +25,7 @@ declare module 'vm' {
|
|
|
25
25
|
displayErrors?: boolean;
|
|
26
26
|
timeout?: number;
|
|
27
27
|
cachedData?: Buffer;
|
|
28
|
+
/** @deprecated in favor of `script.createCachedData()` */
|
|
28
29
|
produceCachedData?: boolean;
|
|
29
30
|
}
|
|
30
31
|
interface RunningScriptOptions extends BaseOptions {
|
|
@@ -123,6 +124,7 @@ declare module 'vm' {
|
|
|
123
124
|
runInNewContext(sandbox?: Context, options?: RunningScriptOptions): any;
|
|
124
125
|
runInThisContext(options?: RunningScriptOptions): any;
|
|
125
126
|
createCachedData(): Buffer;
|
|
127
|
+
cachedDataRejected?: boolean;
|
|
126
128
|
}
|
|
127
129
|
function createContext(sandbox?: Context, options?: CreateContextOptions): Context;
|
|
128
130
|
function isContext(sandbox: Context): boolean;
|