@types/node 14.14.26 → 14.14.30

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 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: Thu, 11 Feb 2021 21:04:31 GMT
11
+ * Last updated: Fri, 19 Feb 2021 00:38:57 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), [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), [Jason Kwok](https://github.com/JasonHK), [Victor Perin](https://github.com/victorperin), and [Yongsheng Zhang](https://github.com/ZYSzys).
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), [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), [Jason Kwok](https://github.com/JasonHK), [Victor Perin](https://github.com/victorperin), and [Yongsheng Zhang](https://github.com/ZYSzys).
node/assert.d.ts CHANGED
@@ -1,3 +1,8 @@
1
+ declare module 'node:assert' {
2
+ import assert = require('assert');
3
+ export = assert;
4
+ }
5
+
1
6
  declare module 'assert' {
2
7
  /** An alias of `assert.ok()`. */
3
8
  function assert(value: any, message?: string | Error): asserts value;
node/async_hooks.d.ts CHANGED
@@ -1,7 +1,14 @@
1
1
  /**
2
2
  * Async Hooks module: https://nodejs.org/api/async_hooks.html
3
3
  */
4
- declare module "async_hooks" {
4
+ declare module 'node:async_hooks' {
5
+ export * from 'async_hooks';
6
+ }
7
+
8
+ /**
9
+ * Async Hooks module: https://nodejs.org/api/async_hooks.html
10
+ */
11
+ declare module 'async_hooks' {
5
12
  /**
6
13
  * Returns the asyncId of the current execution context.
7
14
  */
node/buffer.d.ts CHANGED
@@ -1,4 +1,8 @@
1
- declare module "buffer" {
1
+ declare module 'node:buffer' {
2
+ export * from 'buffer';
3
+ }
4
+
5
+ declare module 'buffer' {
2
6
  export const INSPECT_MAX_BYTES: number;
3
7
  export const kMaxLength: number;
4
8
  export const kStringMaxLength: number;
node/child_process.d.ts CHANGED
@@ -1,8 +1,12 @@
1
- declare module "child_process" {
2
- import { BaseEncodingOptions } from 'fs';
3
- import * as events from "events";
4
- import * as net from "net";
5
- import { Writable, Readable, Stream, Pipe } from "stream";
1
+ declare module 'node:child_process' {
2
+ export * from 'child_process';
3
+ }
4
+
5
+ declare module 'child_process' {
6
+ import { BaseEncodingOptions } from 'node:fs';
7
+ import * as events from 'node:events';
8
+ import * as net from 'node:net';
9
+ import { Writable, Readable, Stream, Pipe } from 'node:stream';
6
10
 
7
11
  type Serializable = string | object | number | boolean;
8
12
  type SendHandle = net.Socket | net.Server;
node/cluster.d.ts CHANGED
@@ -1,7 +1,11 @@
1
- declare module "cluster" {
2
- import * as child from "child_process";
3
- import * as events from "events";
4
- import * as net from "net";
1
+ declare module 'node:cluster' {
2
+ export * from 'cluster';
3
+ }
4
+
5
+ declare module 'cluster' {
6
+ import * as child from 'node:child_process';
7
+ import EventEmitter = require('node:events');
8
+ import * as net from 'node:net';
5
9
 
6
10
  // interfaces
7
11
  interface ClusterSettings {
@@ -21,7 +25,7 @@ declare module "cluster" {
21
25
  addressType: number | "udp4" | "udp6"; // 4, 6, -1, "udp4", "udp6"
22
26
  }
23
27
 
24
- class Worker extends events.EventEmitter {
28
+ class Worker extends EventEmitter {
25
29
  id: number;
26
30
  process: child.ChildProcess;
27
31
  send(message: child.Serializable, sendHandle?: child.SendHandle, callback?: (error: Error | null) => void): boolean;
@@ -90,7 +94,7 @@ declare module "cluster" {
90
94
  prependOnceListener(event: "online", listener: () => void): this;
91
95
  }
92
96
 
93
- interface Cluster extends events.EventEmitter {
97
+ interface Cluster extends EventEmitter {
94
98
  Worker: Worker;
95
99
  disconnect(callback?: () => void): void;
96
100
  fork(env?: any): Worker;
node/console.d.ts CHANGED
@@ -1,5 +1,9 @@
1
- declare module "console" {
2
- import { InspectOptions } from 'util';
1
+ declare module 'node:console' {
2
+ export = console;
3
+ }
4
+
5
+ declare module 'console' {
6
+ import { InspectOptions } from 'node:util';
3
7
 
4
8
  global {
5
9
  // This needs to be global to avoid TS2403 in case lib.dom.d.ts is present in the same build
node/constants.d.ts CHANGED
@@ -1,8 +1,19 @@
1
1
  /** @deprecated since v6.3.0 - use constants property exposed by the relevant module instead. */
2
- declare module "constants" {
3
- import { constants as osConstants, SignalConstants } from 'os';
4
- import { constants as cryptoConstants } from 'crypto';
5
- import { constants as fsConstants } from 'fs';
6
- const exp: typeof osConstants.errno & typeof osConstants.priority & SignalConstants & typeof cryptoConstants & typeof fsConstants;
2
+ declare module 'node:constants' {
3
+ import exp = require('constants');
4
+ export = exp;
5
+ }
6
+
7
+ /** @deprecated since v6.3.0 - use constants property exposed by the relevant module instead. */
8
+ declare module 'constants' {
9
+ import { constants as osConstants, SignalConstants } from 'node:os';
10
+ import { constants as cryptoConstants } from 'node:crypto';
11
+ import { constants as fsConstants } from 'node:fs';
12
+
13
+ const exp: typeof osConstants.errno &
14
+ typeof osConstants.priority &
15
+ SignalConstants &
16
+ typeof cryptoConstants &
17
+ typeof fsConstants;
7
18
  export = exp;
8
19
  }
node/crypto.d.ts CHANGED
@@ -1,5 +1,9 @@
1
+ declare module 'node:crypto' {
2
+ export * from 'crypto';
3
+ }
4
+
1
5
  declare module 'crypto' {
2
- import * as stream from 'stream';
6
+ import * as stream from 'node:stream';
3
7
 
4
8
  interface Certificate {
5
9
  /**
node/dgram.d.ts CHANGED
@@ -1,7 +1,11 @@
1
- declare module "dgram" {
2
- import { AddressInfo } from "net";
3
- import * as dns from "dns";
4
- import * as events from "events";
1
+ declare module 'node:dgram' {
2
+ export * from 'dgram';
3
+ }
4
+
5
+ declare module 'dgram' {
6
+ import { AddressInfo } from 'node:net';
7
+ import * as dns from 'node:dns';
8
+ import EventEmitter = require('node:events');
5
9
 
6
10
  interface RemoteInfo {
7
11
  address: string;
@@ -34,7 +38,7 @@ declare module "dgram" {
34
38
  function createSocket(type: SocketType, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket;
35
39
  function createSocket(options: SocketOptions, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket;
36
40
 
37
- class Socket extends events.EventEmitter {
41
+ class Socket extends EventEmitter {
38
42
  addMembership(multicastAddress: string, multicastInterface?: string): void;
39
43
  address(): AddressInfo;
40
44
  bind(port?: number, address?: string, callback?: () => void): void;
node/dns.d.ts CHANGED
@@ -1,4 +1,8 @@
1
- declare module "dns" {
1
+ declare module 'node:dns' {
2
+ export * from 'dns';
3
+ }
4
+
5
+ declare module 'dns' {
2
6
  // Supported getaddrinfo flags.
3
7
  const ADDRCONFIG: number;
4
8
  const V4MAPPED: number;
node/domain.d.ts CHANGED
@@ -1,5 +1,9 @@
1
+ declare module 'node:domain' {
2
+ export * from 'domain';
3
+ }
4
+
1
5
  declare module 'domain' {
2
- import EventEmitter = require('events');
6
+ import EventEmitter = require('node:events');
3
7
 
4
8
  global {
5
9
  namespace NodeJS {
node/events.d.ts CHANGED
@@ -1,3 +1,8 @@
1
+ declare module 'node:events' {
2
+ import EventEmitter = require('events');
3
+ export = EventEmitter;
4
+ }
5
+
1
6
  declare module 'events' {
2
7
  interface EventEmitterOptions {
3
8
  /**
node/fs/promises.d.ts CHANGED
@@ -1,6 +1,12 @@
1
1
  declare module 'fs/promises' {
2
+ export * from 'node:fs/promises';
3
+ }
4
+
5
+ declare module 'node:fs/promises' {
2
6
  import {
3
7
  Stats,
8
+ BigIntStats,
9
+ StatOptions,
4
10
  WriteVResult,
5
11
  ReadVResult,
6
12
  PathLike,
@@ -14,7 +20,7 @@ declare module 'fs/promises' {
14
20
  BufferEncodingOption,
15
21
  OpenMode,
16
22
  Mode,
17
- } from 'fs';
23
+ } from 'node:fs';
18
24
 
19
25
  interface FileHandle {
20
26
  /**
@@ -92,7 +98,9 @@ declare module 'fs/promises' {
92
98
  /**
93
99
  * Asynchronous fstat(2) - Get file status.
94
100
  */
95
- 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>;
96
104
 
97
105
  /**
98
106
  * Asynchronous ftruncate(2) - Truncate a file to a specified length.
@@ -357,23 +365,21 @@ declare module 'fs/promises' {
357
365
  */
358
366
  function symlink(target: PathLike, path: PathLike, type?: string | null): Promise<void>;
359
367
 
360
- /**
361
- * Asynchronous fstat(2) - Get file status.
362
- * @param handle A `FileHandle`.
363
- */
364
- function fstat(handle: FileHandle): Promise<Stats>;
365
-
366
368
  /**
367
369
  * Asynchronous lstat(2) - Get file status. Does not dereference symbolic links.
368
370
  * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
369
371
  */
370
- 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>;
371
375
 
372
376
  /**
373
377
  * Asynchronous stat(2) - Get file status.
374
378
  * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
375
379
  */
376
- 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>;
377
383
 
378
384
  /**
379
385
  * Asynchronous link(2) - Create a new link (also known as a hard link) to an existing file.
node/fs.d.ts CHANGED
@@ -1,8 +1,12 @@
1
- declare module "fs" {
2
- import * as stream from "stream";
3
- import * as events from "events";
4
- import { URL } from "url";
5
- import * as promises from 'fs/promises';
1
+ declare module 'node:fs' {
2
+ export * from 'fs';
3
+ }
4
+
5
+ declare module 'fs' {
6
+ import * as stream from 'node:stream';
7
+ import EventEmitter = require('node:events');
8
+ import { URL } from 'node:url';
9
+ import * as promises from 'node:fs/promises';
6
10
 
7
11
  export { promises };
8
12
  /**
@@ -108,7 +112,7 @@ declare module "fs" {
108
112
  readSync(): Dirent | null;
109
113
  }
110
114
 
111
- export interface FSWatcher extends events.EventEmitter {
115
+ export interface FSWatcher extends EventEmitter {
112
116
  close(): void;
113
117
 
114
118
  /**
@@ -536,9 +540,10 @@ declare module "fs" {
536
540
  * Asynchronous stat(2) - Get file status.
537
541
  * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
538
542
  */
539
- export function stat(path: PathLike, options: BigIntOptions, callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void): void;
540
- export function stat(path: PathLike, options: StatOptions, callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void): void;
541
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;
542
547
 
543
548
  // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
544
549
  export namespace stat {
@@ -546,24 +551,27 @@ declare module "fs" {
546
551
  * Asynchronous stat(2) - Get file status.
547
552
  * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
548
553
  */
549
- function __promisify__(path: PathLike, options: BigIntOptions): Promise<BigIntStats>;
550
- function __promisify__(path: PathLike, options: StatOptions): Promise<Stats | BigIntStats>;
551
- 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>;
552
557
  }
553
558
 
554
559
  /**
555
560
  * Synchronous stat(2) - Get file status.
556
561
  * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
557
562
  */
558
- export function statSync(path: PathLike, options: BigIntOptions): BigIntStats;
559
- export function statSync(path: PathLike, options: StatOptions): Stats | BigIntStats;
560
- 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;
561
566
 
562
567
  /**
563
568
  * Asynchronous fstat(2) - Get file status.
564
569
  * @param fd A file descriptor.
565
570
  */
566
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;
567
575
 
568
576
  // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
569
577
  export namespace fstat {
@@ -571,20 +579,27 @@ declare module "fs" {
571
579
  * Asynchronous fstat(2) - Get file status.
572
580
  * @param fd A file descriptor.
573
581
  */
574
- 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>;
575
585
  }
576
586
 
577
587
  /**
578
588
  * Synchronous fstat(2) - Get file status.
579
589
  * @param fd A file descriptor.
580
590
  */
581
- 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;
582
594
 
583
595
  /**
584
596
  * Asynchronous lstat(2) - Get file status. Does not dereference symbolic links.
585
597
  * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
586
598
  */
587
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;
588
603
 
589
604
  // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
590
605
  export namespace lstat {
@@ -592,14 +607,18 @@ declare module "fs" {
592
607
  * Asynchronous lstat(2) - Get file status. Does not dereference symbolic links.
593
608
  * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
594
609
  */
595
- 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>;
596
613
  }
597
614
 
598
615
  /**
599
616
  * Synchronous lstat(2) - Get file status. Does not dereference symbolic links.
600
617
  * @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
601
618
  */
602
- 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;
603
622
 
604
623
  /**
605
624
  * Asynchronous link(2) - Create a new link (also known as a hard link) to an existing file.
@@ -2238,6 +2257,6 @@ declare module "fs" {
2238
2257
  }
2239
2258
 
2240
2259
  export interface StatOptions {
2241
- bigint: boolean;
2260
+ bigint?: boolean;
2242
2261
  }
2243
2262
  }
node/http.d.ts CHANGED
@@ -1,7 +1,11 @@
1
- declare module "http" {
2
- import * as stream from "stream";
3
- import { URL } from "url";
4
- import { Socket, Server as NetServer } from "net";
1
+ declare module 'node:http' {
2
+ export * from 'http';
3
+ }
4
+
5
+ declare module 'http' {
6
+ import * as stream from 'node:stream';
7
+ import { URL } from 'node:url';
8
+ import { Socket, Server as NetServer } from 'node:net';
5
9
 
6
10
  // incoming headers will never contain number
7
11
  interface IncomingHttpHeaders extends NodeJS.Dict<string | string[]> {
node/http2.d.ts CHANGED
@@ -1,13 +1,22 @@
1
- declare module "http2" {
2
- import * as events from "events";
3
- import * as fs from "fs";
4
- import * as net from "net";
5
- import * as stream from "stream";
6
- import * as tls from "tls";
7
- import * as url from "url";
1
+ declare module 'node:http2' {
2
+ export * from 'http2';
3
+ }
8
4
 
9
- import { IncomingHttpHeaders as Http1IncomingHttpHeaders, OutgoingHttpHeaders, IncomingMessage, ServerResponse } from "http";
10
- export { OutgoingHttpHeaders } from "http";
5
+ declare module 'http2' {
6
+ import EventEmitter = require('node:events');
7
+ import * as fs from 'node:fs';
8
+ import * as net from 'node:net';
9
+ import * as stream from 'node:stream';
10
+ import * as tls from 'node:tls';
11
+ import * as url from 'node:url';
12
+
13
+ import {
14
+ IncomingHttpHeaders as Http1IncomingHttpHeaders,
15
+ OutgoingHttpHeaders,
16
+ IncomingMessage,
17
+ ServerResponse,
18
+ } from 'node:http';
19
+ export { OutgoingHttpHeaders } from 'node:http';
11
20
 
12
21
  export interface IncomingHttpStatusHeader {
13
22
  ":status"?: number;
@@ -261,7 +270,7 @@ declare module "http2" {
261
270
  inflateDynamicTableSize?: number;
262
271
  }
263
272
 
264
- export interface Http2Session extends events.EventEmitter {
273
+ export interface Http2Session extends EventEmitter {
265
274
  readonly alpnProtocol?: string;
266
275
  readonly closed: boolean;
267
276
  readonly connecting: boolean;
node/https.d.ts CHANGED
@@ -1,8 +1,11 @@
1
- declare module "https" {
2
- import * as tls from "tls";
3
- import * as events from "events";
4
- import * as http from "http";
5
- import { URL } from "url";
1
+ declare module 'node:https' {
2
+ export * from 'https';
3
+ }
4
+
5
+ declare module 'https' {
6
+ import * as tls from 'node:tls';
7
+ import * as http from 'node:http';
8
+ import { URL } from 'node:url';
6
9
 
7
10
  type ServerOptions = tls.SecureContextOptions & tls.TlsOptions & http.ServerOptions;
8
11
 
node/index.d.ts CHANGED
@@ -12,7 +12,6 @@
12
12
  // David Junger <https://github.com/touffy>
13
13
  // Deividas Bakanas <https://github.com/DeividasBakanas>
14
14
  // Eugene Y. Q. Shen <https://github.com/eyqs>
15
- // Flarna <https://github.com/Flarna>
16
15
  // Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>
17
16
  // Hoàng Văn Khải <https://github.com/KSXGitHub>
18
17
  // Huw <https://github.com/hoo29>
node/inspector.d.ts CHANGED
@@ -10,8 +10,15 @@
10
10
  /**
11
11
  * The inspector module provides an API for interacting with the V8 inspector.
12
12
  */
13
- declare module "inspector" {
14
- import { EventEmitter } from 'events';
13
+ declare module 'node:inspector' {
14
+ export * from 'inspector';
15
+ }
16
+
17
+ /**
18
+ * The inspector module provides an API for interacting with the V8 inspector.
19
+ */
20
+ declare module 'inspector' {
21
+ import EventEmitter = require('node:events');
15
22
 
16
23
  interface InspectorNotification<T> {
17
24
  method: string;
node/module.d.ts CHANGED
@@ -1,5 +1,10 @@
1
- declare module "module" {
2
- import { URL } from "url";
1
+ declare module 'node:module' {
2
+ import Module = require('module');
3
+ export = Module;
4
+ }
5
+
6
+ declare module 'module' {
7
+ import { URL } from 'node:url';
3
8
  namespace Module {
4
9
  /**
5
10
  * Updates all the live bindings for builtin ES Modules to match the properties of the CommonJS exports.
node/net.d.ts CHANGED
@@ -1,9 +1,17 @@
1
- declare module "net" {
2
- import * as stream from "stream";
3
- import * as events from "events";
4
- import * as dns from "dns";
1
+ declare module 'node:net' {
2
+ export * from 'net';
3
+ }
4
+
5
+ declare module 'net' {
6
+ import * as stream from 'node:stream';
7
+ import EventEmitter = require('node:events');
8
+ import * as dns from 'node:dns';
5
9
 
6
- type LookupFunction = (hostname: string, options: dns.LookupOneOptions, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void) => void;
10
+ type LookupFunction = (
11
+ hostname: string,
12
+ options: dns.LookupOneOptions,
13
+ callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void,
14
+ ) => void;
7
15
 
8
16
  interface AddressInfo {
9
17
  address: string;
@@ -191,7 +199,7 @@ declare module "net" {
191
199
  }
192
200
 
193
201
  // https://github.com/nodejs/node/blob/master/lib/net.js
194
- class Server extends events.EventEmitter {
202
+ class Server extends EventEmitter {
195
203
  constructor(connectionListener?: (socket: Socket) => void);
196
204
  constructor(options?: ServerOpts, connectionListener?: (socket: Socket) => void);
197
205
 
node/os.d.ts CHANGED
@@ -1,4 +1,8 @@
1
- declare module "os" {
1
+ declare module 'node:os' {
2
+ export * from 'os';
3
+ }
4
+
5
+ declare module 'os' {
2
6
  interface CpuInfo {
3
7
  model: string;
4
8
  speed: number;
node/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "14.14.26",
3
+ "version": "14.14.30",
4
4
  "description": "TypeScript definitions for Node.js",
5
5
  "license": "MIT",
6
6
  "contributors": [
@@ -64,11 +64,6 @@
64
64
  "url": "https://github.com/eyqs",
65
65
  "githubUsername": "eyqs"
66
66
  },
67
- {
68
- "name": "Flarna",
69
- "url": "https://github.com/Flarna",
70
- "githubUsername": "Flarna"
71
- },
72
67
  {
73
68
  "name": "Hannes Magnusson",
74
69
  "url": "https://github.com/Hannes-Magnusson-CK",
@@ -251,6 +246,6 @@
251
246
  },
252
247
  "scripts": {},
253
248
  "dependencies": {},
254
- "typesPublisherContentHash": "17b47c86751c9605f2b7fe24f7b721984325c2fa26a6d7773151eb03d23e0264",
249
+ "typesPublisherContentHash": "78f651110546a8e4f89075c7ccd6853b60594153dd39d847d29f027a28076b07",
255
250
  "typeScriptVersion": "3.4"
256
251
  }
node/path.d.ts CHANGED
@@ -1,4 +1,9 @@
1
- declare module "path" {
1
+ declare module 'node:path' {
2
+ import path = require('path');
3
+ export = path;
4
+ }
5
+
6
+ declare module 'path' {
2
7
  namespace path {
3
8
  /**
4
9
  * A parsed path object generated by path.parse() or consumed by path.format().
node/perf_hooks.d.ts CHANGED
@@ -1,5 +1,9 @@
1
+ declare module 'node:perf_hooks' {
2
+ export * from 'perf_hooks';
3
+ }
4
+
1
5
  declare module 'perf_hooks' {
2
- import { AsyncResource } from 'async_hooks';
6
+ import { AsyncResource } from 'node:async_hooks';
3
7
 
4
8
  type EntryType = 'node' | 'mark' | 'measure' | 'gc' | 'function' | 'http2' | 'http';
5
9
 
node/process.d.ts CHANGED
@@ -1,5 +1,9 @@
1
- declare module "process" {
2
- import * as tty from "tty";
1
+ declare module 'node:process' {
2
+ export = process;
3
+ }
4
+
5
+ declare module 'process' {
6
+ import * as tty from 'node:tty';
3
7
 
4
8
  global {
5
9
  var process: NodeJS.Process;
node/punycode.d.ts CHANGED
@@ -1,4 +1,22 @@
1
- declare module "punycode" {
1
+ /**
2
+ * @deprecated since v7.0.0
3
+ * The version of the punycode module bundled in Node.js is being deprecated.
4
+ * In a future major version of Node.js this module will be removed.
5
+ * Users currently depending on the punycode module should switch to using
6
+ * the userland-provided Punycode.js module instead.
7
+ */
8
+ declare module 'node:punycode' {
9
+ export * from 'punycode';
10
+ }
11
+
12
+ /**
13
+ * @deprecated since v7.0.0
14
+ * The version of the punycode module bundled in Node.js is being deprecated.
15
+ * In a future major version of Node.js this module will be removed.
16
+ * Users currently depending on the punycode module should switch to using
17
+ * the userland-provided Punycode.js module instead.
18
+ */
19
+ declare module 'punycode' {
2
20
  /**
3
21
  * @deprecated since v7.0.0
4
22
  * The version of the punycode module bundled in Node.js is being deprecated.
node/querystring.d.ts CHANGED
@@ -1,4 +1,8 @@
1
- declare module "querystring" {
1
+ declare module 'node:querystring' {
2
+ export * from 'querystring';
3
+ }
4
+
5
+ declare module 'querystring' {
2
6
  interface StringifyOptions {
3
7
  encodeURIComponent?: (str: string) => string;
4
8
  }
node/readline.d.ts CHANGED
@@ -1,6 +1,9 @@
1
- declare module "readline" {
2
- import * as events from "events";
3
- import * as stream from "stream";
1
+ declare module 'node:readline' {
2
+ export * from 'readline';
3
+ }
4
+
5
+ declare module 'readline' {
6
+ import EventEmitter = require('node:events');
4
7
 
5
8
  interface Key {
6
9
  sequence?: string;
@@ -10,7 +13,7 @@ declare module "readline" {
10
13
  shift?: boolean;
11
14
  }
12
15
 
13
- class Interface extends events.EventEmitter {
16
+ class Interface extends EventEmitter {
14
17
  readonly terminal: boolean;
15
18
 
16
19
  // Need direct access to line/cursor data, for use in external processes
@@ -121,7 +124,7 @@ declare module "readline" {
121
124
  [Symbol.asyncIterator](): AsyncIterableIterator<string>;
122
125
  }
123
126
 
124
- type ReadLine = Interface; // type forwarded for backwards compatiblity
127
+ type ReadLine = Interface; // type forwarded for backwards compatibility
125
128
 
126
129
  type Completer = (line: string) => CompleterResult;
127
130
  type AsyncCompleter = (line: string, callback: (err?: null | Error, result?: CompleterResult) => void) => any;
node/repl.d.ts CHANGED
@@ -1,7 +1,11 @@
1
- declare module "repl" {
2
- import { Interface, Completer, AsyncCompleter } from "readline";
3
- import { Context } from "vm";
4
- import { InspectOptions } from "util";
1
+ declare module 'node:repl' {
2
+ export * from 'repl';
3
+ }
4
+
5
+ declare module 'repl' {
6
+ import { Interface, Completer, AsyncCompleter } from 'node:readline';
7
+ import { Context } from 'node:vm';
8
+ import { InspectOptions } from 'node:util';
5
9
 
6
10
  interface ReplOptions {
7
11
  /**
node/stream.d.ts CHANGED
@@ -1,5 +1,10 @@
1
+ declare module 'node:stream' {
2
+ import Stream = require('stream');
3
+ export = Stream;
4
+ }
5
+
1
6
  declare module 'stream' {
2
- import EventEmitter = require('events');
7
+ import EventEmitter = require('node:events');
3
8
 
4
9
  class internal extends EventEmitter {
5
10
  pipe<T extends NodeJS.WritableStream>(destination: T, options?: { end?: boolean; }): T;
node/string_decoder.d.ts CHANGED
@@ -1,4 +1,8 @@
1
- declare module "string_decoder" {
1
+ declare module 'node:string_decoder' {
2
+ export * from 'string_decoder';
3
+ }
4
+
5
+ declare module 'string_decoder' {
2
6
  class StringDecoder {
3
7
  constructor(encoding?: BufferEncoding);
4
8
  write(buffer: Buffer): string;
node/timers.d.ts CHANGED
@@ -1,4 +1,8 @@
1
- declare module "timers" {
1
+ declare module 'node:timers' {
2
+ export * from 'timers';
3
+ }
4
+
5
+ declare module 'timers' {
2
6
  function setTimeout(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timeout;
3
7
  namespace setTimeout {
4
8
  function __promisify__(ms: number): Promise<void>;
node/tls.d.ts CHANGED
@@ -1,8 +1,9 @@
1
- declare module "tls" {
2
- import * as crypto from "crypto";
3
- import * as dns from "dns";
4
- import * as net from "net";
5
- import * as stream from "stream";
1
+ declare module 'node:tls' {
2
+ export * from 'tls';
3
+ }
4
+
5
+ declare module 'tls' {
6
+ import * as net from 'node:net';
6
7
 
7
8
  const CLIENT_RENEG_LIMIT: number;
8
9
  const CLIENT_RENEG_WINDOW: number;
node/trace_events.d.ts CHANGED
@@ -1,4 +1,8 @@
1
- declare module "trace_events" {
1
+ declare module 'node:trace_events' {
2
+ export * from 'trace_events';
3
+ }
4
+
5
+ declare module 'trace_events' {
2
6
  /**
3
7
  * The `Tracing` object is used to enable or disable tracing for sets of
4
8
  * categories. Instances are created using the
node/ts3.4/assert.d.ts CHANGED
@@ -1,3 +1,8 @@
1
+ declare module 'node:assert' {
2
+ import assert = require('assert');
3
+ export = assert;
4
+ }
5
+
1
6
  declare module 'assert' {
2
7
  /** An alias of `assert.ok()`. */
3
8
  function assert(value: any, message?: string | Error): void;
node/tty.d.ts CHANGED
@@ -1,5 +1,9 @@
1
- declare module "tty" {
2
- import * as net from "net";
1
+ declare module 'node:tty' {
2
+ export * from 'tty';
3
+ }
4
+
5
+ declare module 'tty' {
6
+ import * as net from 'node:net';
3
7
 
4
8
  function isatty(fd: number): boolean;
5
9
  class ReadStream extends net.Socket {
node/url.d.ts CHANGED
@@ -1,5 +1,9 @@
1
- declare module "url" {
2
- import { ParsedUrlQuery, ParsedUrlQueryInput } from 'querystring';
1
+ declare module 'node:url' {
2
+ export * from 'url';
3
+ }
4
+
5
+ declare module 'url' {
6
+ import { ParsedUrlQuery, ParsedUrlQueryInput } from 'node:querystring';
3
7
 
4
8
  // Input to `url.format`
5
9
  interface UrlObject {
node/util.d.ts CHANGED
@@ -1,4 +1,8 @@
1
- declare module "util" {
1
+ declare module 'node:util' {
2
+ export * from 'util';
3
+ }
4
+
5
+ declare module 'util' {
2
6
  interface InspectOptions extends NodeJS.InspectOptions { }
3
7
  type Style = 'special' | 'number' | 'bigint' | 'boolean' | 'undefined' | 'null' | 'string' | 'symbol' | 'date' | 'regexp' | 'module';
4
8
  type CustomInspectFunction = (depth: number, options: InspectOptionsStylized) => string;
node/v8.d.ts CHANGED
@@ -1,5 +1,9 @@
1
- declare module "v8" {
2
- import { Readable } from "stream";
1
+ declare module 'node:v8' {
2
+ export * from 'v8';
3
+ }
4
+
5
+ declare module 'v8' {
6
+ import { Readable } from 'node:stream';
3
7
 
4
8
  interface HeapSpaceInfo {
5
9
  space_name: string;
node/vm.d.ts CHANGED
@@ -1,4 +1,8 @@
1
- declare module "vm" {
1
+ declare module 'node:vm' {
2
+ export * from 'vm';
3
+ }
4
+
5
+ declare module 'vm' {
2
6
  interface Context extends NodeJS.Dict<any> { }
3
7
  interface BaseOptions {
4
8
  /**
@@ -21,6 +25,7 @@ declare module "vm" {
21
25
  displayErrors?: boolean;
22
26
  timeout?: number;
23
27
  cachedData?: Buffer;
28
+ /** @deprecated in favor of `script.createCachedData()` */
24
29
  produceCachedData?: boolean;
25
30
  }
26
31
  interface RunningScriptOptions extends BaseOptions {
@@ -119,6 +124,7 @@ declare module "vm" {
119
124
  runInNewContext(sandbox?: Context, options?: RunningScriptOptions): any;
120
125
  runInThisContext(options?: RunningScriptOptions): any;
121
126
  createCachedData(): Buffer;
127
+ cachedDataRejected?: boolean;
122
128
  }
123
129
  function createContext(sandbox?: Context, options?: CreateContextOptions): Context;
124
130
  function isContext(sandbox: Context): boolean;
node/wasi.d.ts CHANGED
@@ -1,3 +1,7 @@
1
+ declare module 'node:wasi' {
2
+ export * from 'wasi';
3
+ }
4
+
1
5
  declare module 'wasi' {
2
6
  interface WASIOptions {
3
7
  /**
node/worker_threads.d.ts CHANGED
@@ -1,9 +1,13 @@
1
- declare module "worker_threads" {
2
- import { Context } from "vm";
3
- import { EventEmitter } from "events";
4
- import { Readable, Writable } from "stream";
5
- import { URL } from "url";
6
- import { FileHandle } from "fs/promises";
1
+ declare module 'node:worker_threads' {
2
+ export * from 'worker_threads';
3
+ }
4
+
5
+ declare module 'worker_threads' {
6
+ import { Context } from 'node:vm';
7
+ import EventEmitter = require('node:events');
8
+ import { Readable, Writable } from 'node:stream';
9
+ import { URL } from 'node:url';
10
+ import { FileHandle } from 'node:fs/promises';
7
11
 
8
12
  const isMainThread: boolean;
9
13
  const parentPort: null | MessagePort;
node/zlib.d.ts CHANGED
@@ -1,5 +1,9 @@
1
- declare module "zlib" {
2
- import * as stream from "stream";
1
+ declare module 'node:zlib' {
2
+ export * from 'zlib';
3
+ }
4
+
5
+ declare module 'zlib' {
6
+ import * as stream from 'node:stream';
3
7
 
4
8
  interface ZlibOptions {
5
9
  /**