@types/node 8.10.42 → 8.10.46
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 v8/README.md +2 -2
- node v8/index.d.ts +119 -119
- node v8/package.json +7 -2
node v8/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/v8
|
|
9
9
|
|
|
10
10
|
Additional Details
|
|
11
|
-
* Last updated:
|
|
11
|
+
* Last updated: Fri, 19 Apr 2019 19:51:05 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
13
|
* Global values: Buffer, NodeJS, SlowBuffer, Symbol, __dirname, __filename, clearImmediate, clearInterval, clearTimeout, console, exports, global, module, process, 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>, Parambir Singh <https://github.com/parambirs>, Christian Vaagland Tellnes <https://github.com/tellnes>, Wilco Bakker <https://github.com/WilcoBakker>, Nicolas Voigt <https://github.com/octo-sniffle>, Chigozirim C. <https://github.com/smac89>, Flarna <https://github.com/Flarna>, Mariusz Wiktorczyk <https://github.com/mwiktorczyk>, wwwy3y3 <https://github.com/wwwy3y3>, Deividas Bakanas <https://github.com/DeividasBakanas>, Kelvin Jin <https://github.com/kjin>, Alvis HT Tang <https://github.com/alvis>, Sebastian Silbermann <https://github.com/eps1lon>, Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>, Alberto Schiabel <https://github.com/jkomyno>, Huw <https://github.com/hoo29>, Nicolas Even <https://github.com/n-e>, Bruno Scheufler <https://github.com/brunoscheufler>, Hoàng Văn Khải <https://github.com/KSXGitHub>, Lishude <https://github.com/islishude>, Andrew Makarov <https://github.com/r3nya>, Jordi Oliveras Rovira <https://github.com/j-oliveras>.
|
|
16
|
+
These definitions were written by Microsoft TypeScript <https://github.com/Microsoft>, DefinitelyTyped <https://github.com/DefinitelyTyped>, Parambir Singh <https://github.com/parambirs>, Christian Vaagland Tellnes <https://github.com/tellnes>, Wilco Bakker <https://github.com/WilcoBakker>, Nicolas Voigt <https://github.com/octo-sniffle>, Chigozirim C. <https://github.com/smac89>, Flarna <https://github.com/Flarna>, Mariusz Wiktorczyk <https://github.com/mwiktorczyk>, wwwy3y3 <https://github.com/wwwy3y3>, Deividas Bakanas <https://github.com/DeividasBakanas>, Kelvin Jin <https://github.com/kjin>, Alvis HT Tang <https://github.com/alvis>, Sebastian Silbermann <https://github.com/eps1lon>, Hannes Magnusson <https://github.com/Hannes-Magnusson-CK>, Alberto Schiabel <https://github.com/jkomyno>, Huw <https://github.com/hoo29>, Nicolas Even <https://github.com/n-e>, Bruno Scheufler <https://github.com/brunoscheufler>, Hoàng Văn Khải <https://github.com/KSXGitHub>, Lishude <https://github.com/islishude>, Andrew Makarov <https://github.com/r3nya>, Jordi Oliveras Rovira <https://github.com/j-oliveras>, Thanik Bhongbhibhat <https://github.com/bhongy>.
|
node v8/index.d.ts
CHANGED
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
// Lishude <https://github.com/islishude>
|
|
24
24
|
// Andrew Makarov <https://github.com/r3nya>
|
|
25
25
|
// Jordi Oliveras Rovira <https://github.com/j-oliveras>
|
|
26
|
+
// Thanik Bhongbhibhat <https://github.com/bhongy>
|
|
26
27
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
27
28
|
// TypeScript Version: 2.1
|
|
28
29
|
|
|
@@ -2258,6 +2259,7 @@ declare module "child_process" {
|
|
|
2258
2259
|
execArgv?: string[];
|
|
2259
2260
|
silent?: boolean;
|
|
2260
2261
|
stdio?: any[];
|
|
2262
|
+
detached?: boolean;
|
|
2261
2263
|
uid?: number;
|
|
2262
2264
|
gid?: number;
|
|
2263
2265
|
windowsVerbatimArguments?: boolean;
|
|
@@ -2471,11 +2473,11 @@ declare module "dns" {
|
|
|
2471
2473
|
family: number;
|
|
2472
2474
|
}
|
|
2473
2475
|
|
|
2474
|
-
export function lookup(hostname: string, family: number, callback: (err: NodeJS.ErrnoException, address: string, family: number) => void): void;
|
|
2475
|
-
export function lookup(hostname: string, options: LookupOneOptions, callback: (err: NodeJS.ErrnoException, address: string, family: number) => void): void;
|
|
2476
|
-
export function lookup(hostname: string, options: LookupAllOptions, callback: (err: NodeJS.ErrnoException, addresses: LookupAddress[]) => void): void;
|
|
2477
|
-
export function lookup(hostname: string, options: LookupOptions, callback: (err: NodeJS.ErrnoException, address: string | LookupAddress[], family: number) => void): void;
|
|
2478
|
-
export function lookup(hostname: string, callback: (err: NodeJS.ErrnoException, address: string, family: number) => void): void;
|
|
2476
|
+
export function lookup(hostname: string, family: number, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void): void;
|
|
2477
|
+
export function lookup(hostname: string, options: LookupOneOptions, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void): void;
|
|
2478
|
+
export function lookup(hostname: string, options: LookupAllOptions, callback: (err: NodeJS.ErrnoException | null, addresses: LookupAddress[]) => void): void;
|
|
2479
|
+
export function lookup(hostname: string, options: LookupOptions, callback: (err: NodeJS.ErrnoException | null, address: string | LookupAddress[], family: number) => void): void;
|
|
2480
|
+
export function lookup(hostname: string, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void): void;
|
|
2479
2481
|
|
|
2480
2482
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
2481
2483
|
export namespace lookup {
|
|
@@ -2484,7 +2486,7 @@ declare module "dns" {
|
|
|
2484
2486
|
export function __promisify__(hostname: string, options?: LookupOptions | number): Promise<{ address: string | LookupAddress[], family?: number }>;
|
|
2485
2487
|
}
|
|
2486
2488
|
|
|
2487
|
-
export function lookupService(address: string, port: number, callback: (err: NodeJS.ErrnoException, hostname: string, service: string) => void): void;
|
|
2489
|
+
export function lookupService(address: string, port: number, callback: (err: NodeJS.ErrnoException | null, hostname: string, service: string) => void): void;
|
|
2488
2490
|
|
|
2489
2491
|
export namespace lookupService {
|
|
2490
2492
|
export function __promisify__(address: string, port: number): Promise<{ hostname: string, service: string }>;
|
|
@@ -2589,19 +2591,19 @@ declare module "dns" {
|
|
|
2589
2591
|
AnySrvRecord |
|
|
2590
2592
|
AnyTxtRecord;
|
|
2591
2593
|
|
|
2592
|
-
export function resolve(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
|
2593
|
-
export function resolve(hostname: string, rrtype: "A", callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
|
2594
|
-
export function resolve(hostname: string, rrtype: "AAAA", callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
|
2595
|
-
export function resolve(hostname: string, rrtype: "ANY", callback: (err: NodeJS.ErrnoException, addresses: AnyRecord[]) => void): void;
|
|
2596
|
-
export function resolve(hostname: string, rrtype: "CNAME", callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
|
2597
|
-
export function resolve(hostname: string, rrtype: "MX", callback: (err: NodeJS.ErrnoException, addresses: MxRecord[]) => void): void;
|
|
2598
|
-
export function resolve(hostname: string, rrtype: "NAPTR", callback: (err: NodeJS.ErrnoException, addresses: NaptrRecord[]) => void): void;
|
|
2599
|
-
export function resolve(hostname: string, rrtype: "NS", callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
|
2600
|
-
export function resolve(hostname: string, rrtype: "PTR", callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
|
2601
|
-
export function resolve(hostname: string, rrtype: "SOA", callback: (err: NodeJS.ErrnoException, addresses: SoaRecord) => void): void;
|
|
2602
|
-
export function resolve(hostname: string, rrtype: "SRV", callback: (err: NodeJS.ErrnoException, addresses: SrvRecord[]) => void): void;
|
|
2603
|
-
export function resolve(hostname: string, rrtype: "TXT", callback: (err: NodeJS.ErrnoException, addresses: string[][]) => void): void;
|
|
2604
|
-
export function resolve(hostname: string, rrtype: string, callback: (err: NodeJS.ErrnoException, addresses: string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]) => void): void;
|
|
2594
|
+
export function resolve(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
|
|
2595
|
+
export function resolve(hostname: string, rrtype: "A", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
|
|
2596
|
+
export function resolve(hostname: string, rrtype: "AAAA", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
|
|
2597
|
+
export function resolve(hostname: string, rrtype: "ANY", callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void): void;
|
|
2598
|
+
export function resolve(hostname: string, rrtype: "CNAME", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
|
|
2599
|
+
export function resolve(hostname: string, rrtype: "MX", callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void): void;
|
|
2600
|
+
export function resolve(hostname: string, rrtype: "NAPTR", callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void): void;
|
|
2601
|
+
export function resolve(hostname: string, rrtype: "NS", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
|
|
2602
|
+
export function resolve(hostname: string, rrtype: "PTR", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
|
|
2603
|
+
export function resolve(hostname: string, rrtype: "SOA", callback: (err: NodeJS.ErrnoException | null, addresses: SoaRecord) => void): void;
|
|
2604
|
+
export function resolve(hostname: string, rrtype: "SRV", callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void): void;
|
|
2605
|
+
export function resolve(hostname: string, rrtype: "TXT", callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void): void;
|
|
2606
|
+
export function resolve(hostname: string, rrtype: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]) => void): void;
|
|
2605
2607
|
|
|
2606
2608
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
2607
2609
|
export namespace resolve {
|
|
@@ -2615,9 +2617,9 @@ declare module "dns" {
|
|
|
2615
2617
|
export function __promisify__(hostname: string, rrtype: string): Promise<string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]>;
|
|
2616
2618
|
}
|
|
2617
2619
|
|
|
2618
|
-
export function resolve4(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
|
2619
|
-
export function resolve4(hostname: string, options: ResolveWithTtlOptions, callback: (err: NodeJS.ErrnoException, addresses: RecordWithTtl[]) => void): void;
|
|
2620
|
-
export function resolve4(hostname: string, options: ResolveOptions, callback: (err: NodeJS.ErrnoException, addresses: string[] | RecordWithTtl[]) => void): void;
|
|
2620
|
+
export function resolve4(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
|
|
2621
|
+
export function resolve4(hostname: string, options: ResolveWithTtlOptions, callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void): void;
|
|
2622
|
+
export function resolve4(hostname: string, options: ResolveOptions, callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void): void;
|
|
2621
2623
|
|
|
2622
2624
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
2623
2625
|
export namespace resolve4 {
|
|
@@ -2626,9 +2628,9 @@ declare module "dns" {
|
|
|
2626
2628
|
export function __promisify__(hostname: string, options?: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
|
|
2627
2629
|
}
|
|
2628
2630
|
|
|
2629
|
-
export function resolve6(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
|
2630
|
-
export function resolve6(hostname: string, options: ResolveWithTtlOptions, callback: (err: NodeJS.ErrnoException, addresses: RecordWithTtl[]) => void): void;
|
|
2631
|
-
export function resolve6(hostname: string, options: ResolveOptions, callback: (err: NodeJS.ErrnoException, addresses: string[] | RecordWithTtl[]) => void): void;
|
|
2631
|
+
export function resolve6(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
|
|
2632
|
+
export function resolve6(hostname: string, options: ResolveWithTtlOptions, callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void): void;
|
|
2633
|
+
export function resolve6(hostname: string, options: ResolveOptions, callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void): void;
|
|
2632
2634
|
|
|
2633
2635
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
2634
2636
|
export namespace resolve6 {
|
|
@@ -2637,52 +2639,52 @@ declare module "dns" {
|
|
|
2637
2639
|
export function __promisify__(hostname: string, options?: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
|
|
2638
2640
|
}
|
|
2639
2641
|
|
|
2640
|
-
export function resolveCname(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
|
2642
|
+
export function resolveCname(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
|
|
2641
2643
|
export namespace resolveCname {
|
|
2642
2644
|
export function __promisify__(hostname: string): Promise<string[]>;
|
|
2643
2645
|
}
|
|
2644
2646
|
|
|
2645
|
-
export function resolveMx(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: MxRecord[]) => void): void;
|
|
2647
|
+
export function resolveMx(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void): void;
|
|
2646
2648
|
export namespace resolveMx {
|
|
2647
2649
|
export function __promisify__(hostname: string): Promise<MxRecord[]>;
|
|
2648
2650
|
}
|
|
2649
2651
|
|
|
2650
|
-
export function resolveNaptr(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: NaptrRecord[]) => void): void;
|
|
2652
|
+
export function resolveNaptr(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void): void;
|
|
2651
2653
|
export namespace resolveNaptr {
|
|
2652
2654
|
export function __promisify__(hostname: string): Promise<NaptrRecord[]>;
|
|
2653
2655
|
}
|
|
2654
2656
|
|
|
2655
|
-
export function resolveNs(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
|
2657
|
+
export function resolveNs(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
|
|
2656
2658
|
export namespace resolveNs {
|
|
2657
2659
|
export function __promisify__(hostname: string): Promise<string[]>;
|
|
2658
2660
|
}
|
|
2659
2661
|
|
|
2660
|
-
export function resolvePtr(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
|
2662
|
+
export function resolvePtr(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
|
|
2661
2663
|
export namespace resolvePtr {
|
|
2662
2664
|
export function __promisify__(hostname: string): Promise<string[]>;
|
|
2663
2665
|
}
|
|
2664
2666
|
|
|
2665
|
-
export function resolveSoa(hostname: string, callback: (err: NodeJS.ErrnoException, address: SoaRecord) => void): void;
|
|
2667
|
+
export function resolveSoa(hostname: string, callback: (err: NodeJS.ErrnoException | null, address: SoaRecord) => void): void;
|
|
2666
2668
|
export namespace resolveSoa {
|
|
2667
2669
|
export function __promisify__(hostname: string): Promise<SoaRecord>;
|
|
2668
2670
|
}
|
|
2669
2671
|
|
|
2670
|
-
export function resolveSrv(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: SrvRecord[]) => void): void;
|
|
2672
|
+
export function resolveSrv(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void): void;
|
|
2671
2673
|
export namespace resolveSrv {
|
|
2672
2674
|
export function __promisify__(hostname: string): Promise<SrvRecord[]>;
|
|
2673
2675
|
}
|
|
2674
2676
|
|
|
2675
|
-
export function resolveTxt(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[][]) => void): void;
|
|
2677
|
+
export function resolveTxt(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void): void;
|
|
2676
2678
|
export namespace resolveTxt {
|
|
2677
2679
|
export function __promisify__(hostname: string): Promise<string[][]>;
|
|
2678
2680
|
}
|
|
2679
2681
|
|
|
2680
|
-
export function resolveAny(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: AnyRecord[]) => void): void;
|
|
2682
|
+
export function resolveAny(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void): void;
|
|
2681
2683
|
export namespace resolveAny {
|
|
2682
2684
|
export function __promisify__(hostname: string): Promise<AnyRecord[]>;
|
|
2683
2685
|
}
|
|
2684
2686
|
|
|
2685
|
-
export function reverse(ip: string, callback: (err: NodeJS.ErrnoException, hostnames: string[]) => void): void;
|
|
2687
|
+
export function reverse(ip: string, callback: (err: NodeJS.ErrnoException | null, hostnames: string[]) => void): void;
|
|
2686
2688
|
export function setServers(servers: string[]): void;
|
|
2687
2689
|
export function getServers(): string[];
|
|
2688
2690
|
|
|
@@ -2737,7 +2739,7 @@ declare module "net" {
|
|
|
2737
2739
|
import * as events from "events";
|
|
2738
2740
|
import * as dns from "dns";
|
|
2739
2741
|
|
|
2740
|
-
type LookupFunction = (hostname: string, options: dns.LookupOneOptions, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void) => void;
|
|
2742
|
+
type LookupFunction = (hostname: string, options: dns.LookupOneOptions, callback: (err: NodeJS.ErrnoException | null | null, address: string, family: number) => void) => void;
|
|
2741
2743
|
|
|
2742
2744
|
export interface SocketConstructorOpts {
|
|
2743
2745
|
fd?: number;
|
|
@@ -2901,7 +2903,7 @@ declare module "net" {
|
|
|
2901
2903
|
listen(options: ListenOptions, listeningListener?: Function): this;
|
|
2902
2904
|
listen(handle: any, backlog?: number, listeningListener?: Function): this;
|
|
2903
2905
|
listen(handle: any, listeningListener?: Function): this;
|
|
2904
|
-
close(callback?:
|
|
2906
|
+
close(callback?: (err?: Error) => void): this;
|
|
2905
2907
|
address(): { port: number; family: string; address: string; };
|
|
2906
2908
|
getConnections(cb: (error: Error | null, count: number) => void): void;
|
|
2907
2909
|
ref(): this;
|
|
@@ -3006,7 +3008,7 @@ declare module "dgram" {
|
|
|
3006
3008
|
reuseAddr?: boolean;
|
|
3007
3009
|
recvBufferSize?: number;
|
|
3008
3010
|
sendBufferSize?: number;
|
|
3009
|
-
lookup?: (hostname: string, options: dns.LookupOneOptions, callback: (err: NodeJS.ErrnoException, address: string, family: number) => void) => void;
|
|
3011
|
+
lookup?: (hostname: string, options: dns.LookupOneOptions, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void) => void;
|
|
3010
3012
|
}
|
|
3011
3013
|
|
|
3012
3014
|
export function createSocket(type: SocketType, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket;
|
|
@@ -3217,7 +3219,7 @@ declare module "fs" {
|
|
|
3217
3219
|
* @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3218
3220
|
* URL support is _experimental_.
|
|
3219
3221
|
*/
|
|
3220
|
-
export function rename(oldPath: PathLike, newPath: PathLike, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
3222
|
+
export function rename(oldPath: PathLike, newPath: PathLike, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
3221
3223
|
|
|
3222
3224
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
3223
3225
|
export namespace rename {
|
|
@@ -3245,14 +3247,14 @@ declare module "fs" {
|
|
|
3245
3247
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3246
3248
|
* @param len If not specified, defaults to `0`.
|
|
3247
3249
|
*/
|
|
3248
|
-
export function truncate(path: PathLike, len: number | undefined | null, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
3250
|
+
export function truncate(path: PathLike, len: number | undefined | null, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
3249
3251
|
|
|
3250
3252
|
/**
|
|
3251
3253
|
* Asynchronous truncate(2) - Truncate a file to a specified length.
|
|
3252
3254
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3253
3255
|
* URL support is _experimental_.
|
|
3254
3256
|
*/
|
|
3255
|
-
export function truncate(path: PathLike, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
3257
|
+
export function truncate(path: PathLike, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
3256
3258
|
|
|
3257
3259
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
3258
3260
|
export namespace truncate {
|
|
@@ -3276,13 +3278,13 @@ declare module "fs" {
|
|
|
3276
3278
|
* @param fd A file descriptor.
|
|
3277
3279
|
* @param len If not specified, defaults to `0`.
|
|
3278
3280
|
*/
|
|
3279
|
-
export function ftruncate(fd: number, len: number | undefined | null, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
3281
|
+
export function ftruncate(fd: number, len: number | undefined | null, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
3280
3282
|
|
|
3281
3283
|
/**
|
|
3282
3284
|
* Asynchronous ftruncate(2) - Truncate a file to a specified length.
|
|
3283
3285
|
* @param fd A file descriptor.
|
|
3284
3286
|
*/
|
|
3285
|
-
export function ftruncate(fd: number, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
3287
|
+
export function ftruncate(fd: number, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
3286
3288
|
|
|
3287
3289
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
3288
3290
|
export namespace ftruncate {
|
|
@@ -3305,7 +3307,7 @@ declare module "fs" {
|
|
|
3305
3307
|
* Asynchronous chown(2) - Change ownership of a file.
|
|
3306
3308
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3307
3309
|
*/
|
|
3308
|
-
export function chown(path: PathLike, uid: number, gid: number, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
3310
|
+
export function chown(path: PathLike, uid: number, gid: number, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
3309
3311
|
|
|
3310
3312
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
3311
3313
|
export namespace chown {
|
|
@@ -3326,7 +3328,7 @@ declare module "fs" {
|
|
|
3326
3328
|
* Asynchronous fchown(2) - Change ownership of a file.
|
|
3327
3329
|
* @param fd A file descriptor.
|
|
3328
3330
|
*/
|
|
3329
|
-
export function fchown(fd: number, uid: number, gid: number, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
3331
|
+
export function fchown(fd: number, uid: number, gid: number, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
3330
3332
|
|
|
3331
3333
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
3332
3334
|
export namespace fchown {
|
|
@@ -3347,7 +3349,7 @@ declare module "fs" {
|
|
|
3347
3349
|
* Asynchronous lchown(2) - Change ownership of a file. Does not dereference symbolic links.
|
|
3348
3350
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3349
3351
|
*/
|
|
3350
|
-
export function lchown(path: PathLike, uid: number, gid: number, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
3352
|
+
export function lchown(path: PathLike, uid: number, gid: number, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
3351
3353
|
|
|
3352
3354
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
3353
3355
|
export namespace lchown {
|
|
@@ -3369,7 +3371,7 @@ declare module "fs" {
|
|
|
3369
3371
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3370
3372
|
* @param mode A file mode. If a string is passed, it is parsed as an octal integer.
|
|
3371
3373
|
*/
|
|
3372
|
-
export function chmod(path: PathLike, mode: string | number, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
3374
|
+
export function chmod(path: PathLike, mode: string | number, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
3373
3375
|
|
|
3374
3376
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
3375
3377
|
export namespace chmod {
|
|
@@ -3393,7 +3395,7 @@ declare module "fs" {
|
|
|
3393
3395
|
* @param fd A file descriptor.
|
|
3394
3396
|
* @param mode A file mode. If a string is passed, it is parsed as an octal integer.
|
|
3395
3397
|
*/
|
|
3396
|
-
export function fchmod(fd: number, mode: string | number, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
3398
|
+
export function fchmod(fd: number, mode: string | number, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
3397
3399
|
|
|
3398
3400
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
3399
3401
|
export namespace fchmod {
|
|
@@ -3417,7 +3419,7 @@ declare module "fs" {
|
|
|
3417
3419
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3418
3420
|
* @param mode A file mode. If a string is passed, it is parsed as an octal integer.
|
|
3419
3421
|
*/
|
|
3420
|
-
export function lchmod(path: PathLike, mode: string | number, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
3422
|
+
export function lchmod(path: PathLike, mode: string | number, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
3421
3423
|
|
|
3422
3424
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
3423
3425
|
export namespace lchmod {
|
|
@@ -3440,7 +3442,7 @@ declare module "fs" {
|
|
|
3440
3442
|
* Asynchronous stat(2) - Get file status.
|
|
3441
3443
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3442
3444
|
*/
|
|
3443
|
-
export function stat(path: PathLike, callback: (err: NodeJS.ErrnoException, stats: Stats) => void): void;
|
|
3445
|
+
export function stat(path: PathLike, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void;
|
|
3444
3446
|
|
|
3445
3447
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
3446
3448
|
export namespace stat {
|
|
@@ -3461,7 +3463,7 @@ declare module "fs" {
|
|
|
3461
3463
|
* Asynchronous fstat(2) - Get file status.
|
|
3462
3464
|
* @param fd A file descriptor.
|
|
3463
3465
|
*/
|
|
3464
|
-
export function fstat(fd: number, callback: (err: NodeJS.ErrnoException, stats: Stats) => void): void;
|
|
3466
|
+
export function fstat(fd: number, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void;
|
|
3465
3467
|
|
|
3466
3468
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
3467
3469
|
export namespace fstat {
|
|
@@ -3482,7 +3484,7 @@ declare module "fs" {
|
|
|
3482
3484
|
* Asynchronous lstat(2) - Get file status. Does not dereference symbolic links.
|
|
3483
3485
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3484
3486
|
*/
|
|
3485
|
-
export function lstat(path: PathLike, callback: (err: NodeJS.ErrnoException, stats: Stats) => void): void;
|
|
3487
|
+
export function lstat(path: PathLike, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void;
|
|
3486
3488
|
|
|
3487
3489
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
3488
3490
|
export namespace lstat {
|
|
@@ -3504,7 +3506,7 @@ declare module "fs" {
|
|
|
3504
3506
|
* @param existingPath A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3505
3507
|
* @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3506
3508
|
*/
|
|
3507
|
-
export function link(existingPath: PathLike, newPath: PathLike, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
3509
|
+
export function link(existingPath: PathLike, newPath: PathLike, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
3508
3510
|
|
|
3509
3511
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
3510
3512
|
export namespace link {
|
|
@@ -3530,14 +3532,14 @@ declare module "fs" {
|
|
|
3530
3532
|
* @param type May be set to `'dir'`, `'file'`, or `'junction'` (default is `'file'`) and is only available on Windows (ignored on other platforms).
|
|
3531
3533
|
* When using `'junction'`, the `target` argument will automatically be normalized to an absolute path.
|
|
3532
3534
|
*/
|
|
3533
|
-
export function symlink(target: PathLike, path: PathLike, type: symlink.Type | undefined | null, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
3535
|
+
export function symlink(target: PathLike, path: PathLike, type: symlink.Type | undefined | null, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
3534
3536
|
|
|
3535
3537
|
/**
|
|
3536
3538
|
* Asynchronous symlink(2) - Create a new symbolic link to an existing file.
|
|
3537
3539
|
* @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol.
|
|
3538
3540
|
* @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol.
|
|
3539
3541
|
*/
|
|
3540
|
-
export function symlink(target: PathLike, path: PathLike, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
3542
|
+
export function symlink(target: PathLike, path: PathLike, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
3541
3543
|
|
|
3542
3544
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
3543
3545
|
export namespace symlink {
|
|
@@ -3567,27 +3569,27 @@ declare module "fs" {
|
|
|
3567
3569
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3568
3570
|
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
3569
3571
|
*/
|
|
3570
|
-
export function readlink(path: PathLike, options: { encoding?: BufferEncoding | null } | BufferEncoding | undefined | null, callback: (err: NodeJS.ErrnoException, linkString: string) => void): void;
|
|
3572
|
+
export function readlink(path: PathLike, options: { encoding?: BufferEncoding | null } | BufferEncoding | undefined | null, callback: (err: NodeJS.ErrnoException | null, linkString: string) => void): void;
|
|
3571
3573
|
|
|
3572
3574
|
/**
|
|
3573
3575
|
* Asynchronous readlink(2) - read value of a symbolic link.
|
|
3574
3576
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3575
3577
|
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
3576
3578
|
*/
|
|
3577
|
-
export function readlink(path: PathLike, options: { encoding: "buffer" } | "buffer", callback: (err: NodeJS.ErrnoException, linkString: Buffer) => void): void;
|
|
3579
|
+
export function readlink(path: PathLike, options: { encoding: "buffer" } | "buffer", callback: (err: NodeJS.ErrnoException | null, linkString: Buffer) => void): void;
|
|
3578
3580
|
|
|
3579
3581
|
/**
|
|
3580
3582
|
* Asynchronous readlink(2) - read value of a symbolic link.
|
|
3581
3583
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3582
3584
|
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
3583
3585
|
*/
|
|
3584
|
-
export function readlink(path: PathLike, options: { encoding?: string | null } | string | undefined | null, callback: (err: NodeJS.ErrnoException, linkString: string | Buffer) => void): void;
|
|
3586
|
+
export function readlink(path: PathLike, options: { encoding?: string | null } | string | undefined | null, callback: (err: NodeJS.ErrnoException | null, linkString: string | Buffer) => void): void;
|
|
3585
3587
|
|
|
3586
3588
|
/**
|
|
3587
3589
|
* Asynchronous readlink(2) - read value of a symbolic link.
|
|
3588
3590
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3589
3591
|
*/
|
|
3590
|
-
export function readlink(path: PathLike, callback: (err: NodeJS.ErrnoException, linkString: string) => void): void;
|
|
3592
|
+
export function readlink(path: PathLike, callback: (err: NodeJS.ErrnoException | null, linkString: string) => void): void;
|
|
3591
3593
|
|
|
3592
3594
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
3593
3595
|
export namespace readlink {
|
|
@@ -3639,27 +3641,27 @@ declare module "fs" {
|
|
|
3639
3641
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3640
3642
|
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
3641
3643
|
*/
|
|
3642
|
-
export function realpath(path: PathLike, options: { encoding?: BufferEncoding | null } | BufferEncoding | undefined | null, callback: (err: NodeJS.ErrnoException, resolvedPath: string) => void): void;
|
|
3644
|
+
export function realpath(path: PathLike, options: { encoding?: BufferEncoding | null } | BufferEncoding | undefined | null, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void): void;
|
|
3643
3645
|
|
|
3644
3646
|
/**
|
|
3645
3647
|
* Asynchronous realpath(3) - return the canonicalized absolute pathname.
|
|
3646
3648
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3647
3649
|
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
3648
3650
|
*/
|
|
3649
|
-
export function realpath(path: PathLike, options: { encoding: "buffer" } | "buffer", callback: (err: NodeJS.ErrnoException, resolvedPath: Buffer) => void): void;
|
|
3651
|
+
export function realpath(path: PathLike, options: { encoding: "buffer" } | "buffer", callback: (err: NodeJS.ErrnoException | null, resolvedPath: Buffer) => void): void;
|
|
3650
3652
|
|
|
3651
3653
|
/**
|
|
3652
3654
|
* Asynchronous realpath(3) - return the canonicalized absolute pathname.
|
|
3653
3655
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3654
3656
|
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
3655
3657
|
*/
|
|
3656
|
-
export function realpath(path: PathLike, options: { encoding?: string | null } | string | undefined | null, callback: (err: NodeJS.ErrnoException, resolvedPath: string | Buffer) => void): void;
|
|
3658
|
+
export function realpath(path: PathLike, options: { encoding?: string | null } | string | undefined | null, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string | Buffer) => void): void;
|
|
3657
3659
|
|
|
3658
3660
|
/**
|
|
3659
3661
|
* Asynchronous realpath(3) - return the canonicalized absolute pathname.
|
|
3660
3662
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3661
3663
|
*/
|
|
3662
|
-
export function realpath(path: PathLike, callback: (err: NodeJS.ErrnoException, resolvedPath: string) => void): void;
|
|
3664
|
+
export function realpath(path: PathLike, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void): void;
|
|
3663
3665
|
|
|
3664
3666
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
3665
3667
|
export namespace realpath {
|
|
@@ -3710,7 +3712,7 @@ declare module "fs" {
|
|
|
3710
3712
|
* Asynchronous unlink(2) - delete a name and possibly the file it refers to.
|
|
3711
3713
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3712
3714
|
*/
|
|
3713
|
-
export function unlink(path: PathLike, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
3715
|
+
export function unlink(path: PathLike, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
3714
3716
|
|
|
3715
3717
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
3716
3718
|
export namespace unlink {
|
|
@@ -3731,7 +3733,7 @@ declare module "fs" {
|
|
|
3731
3733
|
* Asynchronous rmdir(2) - delete a directory.
|
|
3732
3734
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3733
3735
|
*/
|
|
3734
|
-
export function rmdir(path: PathLike, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
3736
|
+
export function rmdir(path: PathLike, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
3735
3737
|
|
|
3736
3738
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
3737
3739
|
export namespace rmdir {
|
|
@@ -3753,13 +3755,13 @@ declare module "fs" {
|
|
|
3753
3755
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3754
3756
|
* @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
|
|
3755
3757
|
*/
|
|
3756
|
-
export function mkdir(path: PathLike, mode: number | string | undefined | null, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
3758
|
+
export function mkdir(path: PathLike, mode: number | string | undefined | null, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
3757
3759
|
|
|
3758
3760
|
/**
|
|
3759
3761
|
* Asynchronous mkdir(2) - create a directory with a mode of `0o777`.
|
|
3760
3762
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3761
3763
|
*/
|
|
3762
|
-
export function mkdir(path: PathLike, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
3764
|
+
export function mkdir(path: PathLike, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
3763
3765
|
|
|
3764
3766
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
3765
3767
|
export namespace mkdir {
|
|
@@ -3783,27 +3785,27 @@ declare module "fs" {
|
|
|
3783
3785
|
* Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
|
|
3784
3786
|
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
3785
3787
|
*/
|
|
3786
|
-
export function mkdtemp(prefix: string, options: { encoding?: BufferEncoding | null } | BufferEncoding | undefined | null, callback: (err: NodeJS.ErrnoException, folder: string) => void): void;
|
|
3788
|
+
export function mkdtemp(prefix: string, options: { encoding?: BufferEncoding | null } | BufferEncoding | undefined | null, callback: (err: NodeJS.ErrnoException | null, folder: string) => void): void;
|
|
3787
3789
|
|
|
3788
3790
|
/**
|
|
3789
3791
|
* Asynchronously creates a unique temporary directory.
|
|
3790
3792
|
* Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
|
|
3791
3793
|
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
3792
3794
|
*/
|
|
3793
|
-
export function mkdtemp(prefix: string, options: "buffer" | { encoding: "buffer" }, callback: (err: NodeJS.ErrnoException, folder: Buffer) => void): void;
|
|
3795
|
+
export function mkdtemp(prefix: string, options: "buffer" | { encoding: "buffer" }, callback: (err: NodeJS.ErrnoException | null, folder: Buffer) => void): void;
|
|
3794
3796
|
|
|
3795
3797
|
/**
|
|
3796
3798
|
* Asynchronously creates a unique temporary directory.
|
|
3797
3799
|
* Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
|
|
3798
3800
|
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
3799
3801
|
*/
|
|
3800
|
-
export function mkdtemp(prefix: string, options: { encoding?: string | null } | string | undefined | null, callback: (err: NodeJS.ErrnoException, folder: string | Buffer) => void): void;
|
|
3802
|
+
export function mkdtemp(prefix: string, options: { encoding?: string | null } | string | undefined | null, callback: (err: NodeJS.ErrnoException | null, folder: string | Buffer) => void): void;
|
|
3801
3803
|
|
|
3802
3804
|
/**
|
|
3803
3805
|
* Asynchronously creates a unique temporary directory.
|
|
3804
3806
|
* Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
|
|
3805
3807
|
*/
|
|
3806
|
-
export function mkdtemp(prefix: string, callback: (err: NodeJS.ErrnoException, folder: string) => void): void;
|
|
3808
|
+
export function mkdtemp(prefix: string, callback: (err: NodeJS.ErrnoException | null, folder: string) => void): void;
|
|
3807
3809
|
|
|
3808
3810
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
3809
3811
|
export namespace mkdtemp {
|
|
@@ -3855,27 +3857,27 @@ declare module "fs" {
|
|
|
3855
3857
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3856
3858
|
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
3857
3859
|
*/
|
|
3858
|
-
export function readdir(path: PathLike, options: { encoding: BufferEncoding | null } | BufferEncoding | undefined | null, callback: (err: NodeJS.ErrnoException, files: string[]) => void): void;
|
|
3860
|
+
export function readdir(path: PathLike, options: { encoding: BufferEncoding | null } | BufferEncoding | undefined | null, callback: (err: NodeJS.ErrnoException | null, files: string[]) => void): void;
|
|
3859
3861
|
|
|
3860
3862
|
/**
|
|
3861
3863
|
* Asynchronous readdir(3) - read a directory.
|
|
3862
3864
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3863
3865
|
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
3864
3866
|
*/
|
|
3865
|
-
export function readdir(path: PathLike, options: { encoding: "buffer" } | "buffer", callback: (err: NodeJS.ErrnoException, files: Buffer[]) => void): void;
|
|
3867
|
+
export function readdir(path: PathLike, options: { encoding: "buffer" } | "buffer", callback: (err: NodeJS.ErrnoException | null, files: Buffer[]) => void): void;
|
|
3866
3868
|
|
|
3867
3869
|
/**
|
|
3868
3870
|
* Asynchronous readdir(3) - read a directory.
|
|
3869
3871
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3870
3872
|
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
3871
3873
|
*/
|
|
3872
|
-
export function readdir(path: PathLike, options: { encoding?: string | null } | string | undefined | null, callback: (err: NodeJS.ErrnoException, files: string[] | Buffer[]) => void): void;
|
|
3874
|
+
export function readdir(path: PathLike, options: { encoding?: string | null } | string | undefined | null, callback: (err: NodeJS.ErrnoException | null, files: string[] | Buffer[]) => void): void;
|
|
3873
3875
|
|
|
3874
3876
|
/**
|
|
3875
3877
|
* Asynchronous readdir(3) - read a directory.
|
|
3876
3878
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3877
3879
|
*/
|
|
3878
|
-
export function readdir(path: PathLike, callback: (err: NodeJS.ErrnoException, files: string[]) => void): void;
|
|
3880
|
+
export function readdir(path: PathLike, callback: (err: NodeJS.ErrnoException | null, files: string[]) => void): void;
|
|
3879
3881
|
|
|
3880
3882
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
3881
3883
|
export namespace readdir {
|
|
@@ -3926,7 +3928,7 @@ declare module "fs" {
|
|
|
3926
3928
|
* Asynchronous close(2) - close a file descriptor.
|
|
3927
3929
|
* @param fd A file descriptor.
|
|
3928
3930
|
*/
|
|
3929
|
-
export function close(fd: number, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
3931
|
+
export function close(fd: number, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
3930
3932
|
|
|
3931
3933
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
3932
3934
|
export namespace close {
|
|
@@ -3948,13 +3950,13 @@ declare module "fs" {
|
|
|
3948
3950
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3949
3951
|
* @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not supplied, defaults to `0o666`.
|
|
3950
3952
|
*/
|
|
3951
|
-
export function open(path: PathLike, flags: string | number, mode: string | number | undefined | null, callback: (err: NodeJS.ErrnoException, fd: number) => void): void;
|
|
3953
|
+
export function open(path: PathLike, flags: string | number, mode: string | number | undefined | null, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void;
|
|
3952
3954
|
|
|
3953
3955
|
/**
|
|
3954
3956
|
* Asynchronous open(2) - open and possibly create a file. If the file is created, its mode will be `0o666`.
|
|
3955
3957
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
3956
3958
|
*/
|
|
3957
|
-
export function open(path: PathLike, flags: string | number, callback: (err: NodeJS.ErrnoException, fd: number) => void): void;
|
|
3959
|
+
export function open(path: PathLike, flags: string | number, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void;
|
|
3958
3960
|
|
|
3959
3961
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
3960
3962
|
export namespace open {
|
|
@@ -3979,7 +3981,7 @@ declare module "fs" {
|
|
|
3979
3981
|
* @param atime The last access time. If a string is provided, it will be coerced to number.
|
|
3980
3982
|
* @param mtime The last modified time. If a string is provided, it will be coerced to number.
|
|
3981
3983
|
*/
|
|
3982
|
-
export function utimes(path: PathLike, atime: string | number | Date, mtime: string | number | Date, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
3984
|
+
export function utimes(path: PathLike, atime: string | number | Date, mtime: string | number | Date, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
3983
3985
|
|
|
3984
3986
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
3985
3987
|
export namespace utimes {
|
|
@@ -4006,7 +4008,7 @@ declare module "fs" {
|
|
|
4006
4008
|
* @param atime The last access time. If a string is provided, it will be coerced to number.
|
|
4007
4009
|
* @param mtime The last modified time. If a string is provided, it will be coerced to number.
|
|
4008
4010
|
*/
|
|
4009
|
-
export function futimes(fd: number, atime: string | number | Date, mtime: string | number | Date, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
4011
|
+
export function futimes(fd: number, atime: string | number | Date, mtime: string | number | Date, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
4010
4012
|
|
|
4011
4013
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
4012
4014
|
export namespace futimes {
|
|
@@ -4031,7 +4033,7 @@ declare module "fs" {
|
|
|
4031
4033
|
* Asynchronous fsync(2) - synchronize a file's in-core state with the underlying storage device.
|
|
4032
4034
|
* @param fd A file descriptor.
|
|
4033
4035
|
*/
|
|
4034
|
-
export function fsync(fd: number, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
4036
|
+
export function fsync(fd: number, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
4035
4037
|
|
|
4036
4038
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
4037
4039
|
export namespace fsync {
|
|
@@ -4055,7 +4057,7 @@ declare module "fs" {
|
|
|
4055
4057
|
* @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`.
|
|
4056
4058
|
* @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
|
|
4057
4059
|
*/
|
|
4058
|
-
export function write<TBuffer extends Buffer | Uint8Array>(fd: number, buffer: TBuffer, offset: number | undefined | null, length: number | undefined | null, position: number | undefined | null, callback: (err: NodeJS.ErrnoException, written: number, buffer: TBuffer) => void): void;
|
|
4060
|
+
export function write<TBuffer extends Buffer | Uint8Array>(fd: number, buffer: TBuffer, offset: number | undefined | null, length: number | undefined | null, position: number | undefined | null, callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void): void;
|
|
4059
4061
|
|
|
4060
4062
|
/**
|
|
4061
4063
|
* Asynchronously writes `buffer` to the file referenced by the supplied file descriptor.
|
|
@@ -4063,20 +4065,20 @@ declare module "fs" {
|
|
|
4063
4065
|
* @param offset The part of the buffer to be written. If not supplied, defaults to `0`.
|
|
4064
4066
|
* @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`.
|
|
4065
4067
|
*/
|
|
4066
|
-
export function write<TBuffer extends Buffer | Uint8Array>(fd: number, buffer: TBuffer, offset: number | undefined | null, length: number | undefined | null, callback: (err: NodeJS.ErrnoException, written: number, buffer: TBuffer) => void): void;
|
|
4068
|
+
export function write<TBuffer extends Buffer | Uint8Array>(fd: number, buffer: TBuffer, offset: number | undefined | null, length: number | undefined | null, callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void): void;
|
|
4067
4069
|
|
|
4068
4070
|
/**
|
|
4069
4071
|
* Asynchronously writes `buffer` to the file referenced by the supplied file descriptor.
|
|
4070
4072
|
* @param fd A file descriptor.
|
|
4071
4073
|
* @param offset The part of the buffer to be written. If not supplied, defaults to `0`.
|
|
4072
4074
|
*/
|
|
4073
|
-
export function write<TBuffer extends Buffer | Uint8Array>(fd: number, buffer: TBuffer, offset: number | undefined | null, callback: (err: NodeJS.ErrnoException, written: number, buffer: TBuffer) => void): void;
|
|
4075
|
+
export function write<TBuffer extends Buffer | Uint8Array>(fd: number, buffer: TBuffer, offset: number | undefined | null, callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void): void;
|
|
4074
4076
|
|
|
4075
4077
|
/**
|
|
4076
4078
|
* Asynchronously writes `buffer` to the file referenced by the supplied file descriptor.
|
|
4077
4079
|
* @param fd A file descriptor.
|
|
4078
4080
|
*/
|
|
4079
|
-
export function write<TBuffer extends Buffer | Uint8Array>(fd: number, buffer: TBuffer, callback: (err: NodeJS.ErrnoException, written: number, buffer: TBuffer) => void): void;
|
|
4081
|
+
export function write<TBuffer extends Buffer | Uint8Array>(fd: number, buffer: TBuffer, callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void): void;
|
|
4080
4082
|
|
|
4081
4083
|
/**
|
|
4082
4084
|
* Asynchronously writes `string` to the file referenced by the supplied file descriptor.
|
|
@@ -4085,7 +4087,7 @@ declare module "fs" {
|
|
|
4085
4087
|
* @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
|
|
4086
4088
|
* @param encoding The expected string encoding.
|
|
4087
4089
|
*/
|
|
4088
|
-
export function write(fd: number, string: any, position: number | undefined | null, encoding: string | undefined | null, callback: (err: NodeJS.ErrnoException, written: number, str: string) => void): void;
|
|
4090
|
+
export function write(fd: number, string: any, position: number | undefined | null, encoding: string | undefined | null, callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void): void;
|
|
4089
4091
|
|
|
4090
4092
|
/**
|
|
4091
4093
|
* Asynchronously writes `string` to the file referenced by the supplied file descriptor.
|
|
@@ -4093,14 +4095,14 @@ declare module "fs" {
|
|
|
4093
4095
|
* @param string A string to write. If something other than a string is supplied it will be coerced to a string.
|
|
4094
4096
|
* @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
|
|
4095
4097
|
*/
|
|
4096
|
-
export function write(fd: number, string: any, position: number | undefined | null, callback: (err: NodeJS.ErrnoException, written: number, str: string) => void): void;
|
|
4098
|
+
export function write(fd: number, string: any, position: number | undefined | null, callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void): void;
|
|
4097
4099
|
|
|
4098
4100
|
/**
|
|
4099
4101
|
* Asynchronously writes `string` to the file referenced by the supplied file descriptor.
|
|
4100
4102
|
* @param fd A file descriptor.
|
|
4101
4103
|
* @param string A string to write. If something other than a string is supplied it will be coerced to a string.
|
|
4102
4104
|
*/
|
|
4103
|
-
export function write(fd: number, string: any, callback: (err: NodeJS.ErrnoException, written: number, str: string) => void): void;
|
|
4105
|
+
export function write(fd: number, string: any, callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void): void;
|
|
4104
4106
|
|
|
4105
4107
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
4106
4108
|
export namespace write {
|
|
@@ -4149,7 +4151,7 @@ declare module "fs" {
|
|
|
4149
4151
|
* @param length The number of bytes to read.
|
|
4150
4152
|
* @param position The offset from the beginning of the file from which data should be read. If `null`, data will be read from the current position.
|
|
4151
4153
|
*/
|
|
4152
|
-
export function read<TBuffer extends Buffer | Uint8Array>(fd: number, buffer: TBuffer, offset: number, length: number, position: number | null, callback?: (err: NodeJS.ErrnoException, bytesRead: number, buffer: TBuffer) => void): void;
|
|
4154
|
+
export function read<TBuffer extends Buffer | Uint8Array>(fd: number, buffer: TBuffer, offset: number, length: number, position: number | null, callback?: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void): void;
|
|
4153
4155
|
|
|
4154
4156
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
4155
4157
|
export namespace read {
|
|
@@ -4180,7 +4182,7 @@ declare module "fs" {
|
|
|
4180
4182
|
* @param options An object that may contain an optional flag.
|
|
4181
4183
|
* If a flag is not provided, it defaults to `'r'`.
|
|
4182
4184
|
*/
|
|
4183
|
-
export function readFile(path: PathLike | number, options: { encoding?: null; flag?: string; } | undefined | null, callback: (err: NodeJS.ErrnoException, data: Buffer) => void): void;
|
|
4185
|
+
export function readFile(path: PathLike | number, options: { encoding?: null; flag?: string; } | undefined | null, callback: (err: NodeJS.ErrnoException | null, data: Buffer) => void): void;
|
|
4184
4186
|
|
|
4185
4187
|
/**
|
|
4186
4188
|
* Asynchronously reads the entire contents of a file.
|
|
@@ -4190,7 +4192,7 @@ declare module "fs" {
|
|
|
4190
4192
|
* @param options Either the encoding for the result, or an object that contains the encoding and an optional flag.
|
|
4191
4193
|
* If a flag is not provided, it defaults to `'r'`.
|
|
4192
4194
|
*/
|
|
4193
|
-
export function readFile(path: PathLike | number, options: { encoding: string; flag?: string; } | string, callback: (err: NodeJS.ErrnoException, data: string) => void): void;
|
|
4195
|
+
export function readFile(path: PathLike | number, options: { encoding: string; flag?: string; } | string, callback: (err: NodeJS.ErrnoException | null, data: string) => void): void;
|
|
4194
4196
|
|
|
4195
4197
|
/**
|
|
4196
4198
|
* Asynchronously reads the entire contents of a file.
|
|
@@ -4200,14 +4202,14 @@ declare module "fs" {
|
|
|
4200
4202
|
* @param options Either the encoding for the result, or an object that contains the encoding and an optional flag.
|
|
4201
4203
|
* If a flag is not provided, it defaults to `'r'`.
|
|
4202
4204
|
*/
|
|
4203
|
-
export function readFile(path: PathLike | number, options: { encoding?: string | null; flag?: string; } | string | undefined | null, callback: (err: NodeJS.ErrnoException, data: string | Buffer) => void): void;
|
|
4205
|
+
export function readFile(path: PathLike | number, options: { encoding?: string | null; flag?: string; } | string | undefined | null, callback: (err: NodeJS.ErrnoException | null, data: string | Buffer) => void): void;
|
|
4204
4206
|
|
|
4205
4207
|
/**
|
|
4206
4208
|
* Asynchronously reads the entire contents of a file.
|
|
4207
4209
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
4208
4210
|
* If a file descriptor is provided, the underlying file will _not_ be closed automatically.
|
|
4209
4211
|
*/
|
|
4210
|
-
export function readFile(path: PathLike | number, callback: (err: NodeJS.ErrnoException, data: Buffer) => void): void;
|
|
4212
|
+
export function readFile(path: PathLike | number, callback: (err: NodeJS.ErrnoException | null, data: Buffer) => void): void;
|
|
4211
4213
|
|
|
4212
4214
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
4213
4215
|
export namespace readFile {
|
|
@@ -4282,7 +4284,7 @@ declare module "fs" {
|
|
|
4282
4284
|
* If `mode` is a string, it is parsed as an octal integer.
|
|
4283
4285
|
* If `flag` is not supplied, the default of `'w'` is used.
|
|
4284
4286
|
*/
|
|
4285
|
-
export function writeFile(path: PathLike | number, data: any, options: { encoding?: string | null; mode?: number | string; flag?: string; } | string | undefined | null, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
4287
|
+
export function writeFile(path: PathLike | number, data: any, options: { encoding?: string | null; mode?: number | string; flag?: string; } | string | undefined | null, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
4286
4288
|
|
|
4287
4289
|
/**
|
|
4288
4290
|
* Asynchronously writes data to a file, replacing the file if it already exists.
|
|
@@ -4291,7 +4293,7 @@ declare module "fs" {
|
|
|
4291
4293
|
* If a file descriptor is provided, the underlying file will _not_ be closed automatically.
|
|
4292
4294
|
* @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string.
|
|
4293
4295
|
*/
|
|
4294
|
-
export function writeFile(path: PathLike | number, data: any, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
4296
|
+
export function writeFile(path: PathLike | number, data: any, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
4295
4297
|
|
|
4296
4298
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
4297
4299
|
export namespace writeFile {
|
|
@@ -4336,7 +4338,7 @@ declare module "fs" {
|
|
|
4336
4338
|
* If `mode` is a string, it is parsed as an octal integer.
|
|
4337
4339
|
* If `flag` is not supplied, the default of `'a'` is used.
|
|
4338
4340
|
*/
|
|
4339
|
-
export function appendFile(file: PathLike | number, data: any, options: { encoding?: string | null, mode?: string | number, flag?: string } | string | undefined | null, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
4341
|
+
export function appendFile(file: PathLike | number, data: any, options: { encoding?: string | null, mode?: string | number, flag?: string } | string | undefined | null, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
4340
4342
|
|
|
4341
4343
|
/**
|
|
4342
4344
|
* Asynchronously append data to a file, creating the file if it does not exist.
|
|
@@ -4345,7 +4347,7 @@ declare module "fs" {
|
|
|
4345
4347
|
* If a file descriptor is provided, the underlying file will _not_ be closed automatically.
|
|
4346
4348
|
* @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string.
|
|
4347
4349
|
*/
|
|
4348
|
-
export function appendFile(file: PathLike | number, data: any, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
4350
|
+
export function appendFile(file: PathLike | number, data: any, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
4349
4351
|
|
|
4350
4352
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
4351
4353
|
export namespace appendFile {
|
|
@@ -4599,14 +4601,14 @@ declare module "fs" {
|
|
|
4599
4601
|
* @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
|
|
4600
4602
|
* URL support is _experimental_.
|
|
4601
4603
|
*/
|
|
4602
|
-
export function access(path: PathLike, mode: number | undefined, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
4604
|
+
export function access(path: PathLike, mode: number | undefined, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
4603
4605
|
|
|
4604
4606
|
/**
|
|
4605
4607
|
* Asynchronously tests a user's permissions for the file specified by path.
|
|
4606
4608
|
* @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
|
|
4607
4609
|
* URL support is _experimental_.
|
|
4608
4610
|
*/
|
|
4609
|
-
export function access(path: PathLike, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
4611
|
+
export function access(path: PathLike, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
4610
4612
|
|
|
4611
4613
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
4612
4614
|
export namespace access {
|
|
@@ -4659,7 +4661,7 @@ declare module "fs" {
|
|
|
4659
4661
|
* Asynchronous fdatasync(2) - synchronize a file's in-core state with storage device.
|
|
4660
4662
|
* @param fd A file descriptor.
|
|
4661
4663
|
*/
|
|
4662
|
-
export function fdatasync(fd: number, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
4664
|
+
export function fdatasync(fd: number, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
4663
4665
|
|
|
4664
4666
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
4665
4667
|
export namespace fdatasync {
|
|
@@ -4685,7 +4687,7 @@ declare module "fs" {
|
|
|
4685
4687
|
* @param src A path to the source file.
|
|
4686
4688
|
* @param dest A path to the destination file.
|
|
4687
4689
|
*/
|
|
4688
|
-
export function copyFile(src: PathLike, dest: PathLike, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
4690
|
+
export function copyFile(src: PathLike, dest: PathLike, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
4689
4691
|
/**
|
|
4690
4692
|
* Asynchronously copies src to dest. By default, dest is overwritten if it already exists.
|
|
4691
4693
|
* No arguments other than a possible exception are given to the callback function.
|
|
@@ -4696,7 +4698,7 @@ declare module "fs" {
|
|
|
4696
4698
|
* @param dest A path to the destination file.
|
|
4697
4699
|
* @param flags An integer that specifies the behavior of the copy operation. The only supported flag is fs.constants.COPYFILE_EXCL, which causes the copy operation to fail if dest already exists.
|
|
4698
4700
|
*/
|
|
4699
|
-
export function copyFile(src: PathLike, dest: PathLike, flags: number, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
4701
|
+
export function copyFile(src: PathLike, dest: PathLike, flags: number, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
4700
4702
|
|
|
4701
4703
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
4702
4704
|
export namespace copyFile {
|
|
@@ -5710,33 +5712,33 @@ declare module "util" {
|
|
|
5710
5712
|
}
|
|
5711
5713
|
|
|
5712
5714
|
export function callbackify(fn: () => Promise<void>): (callback: (err: NodeJS.ErrnoException) => void) => void;
|
|
5713
|
-
export function callbackify<TResult>(fn: () => Promise<TResult>): (callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void;
|
|
5715
|
+
export function callbackify<TResult>(fn: () => Promise<TResult>): (callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
|
|
5714
5716
|
export function callbackify<T1>(fn: (arg1: T1) => Promise<void>): (arg1: T1, callback: (err: NodeJS.ErrnoException) => void) => void;
|
|
5715
|
-
export function callbackify<T1, TResult>(fn: (arg1: T1) => Promise<TResult>): (arg1: T1, callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void;
|
|
5717
|
+
export function callbackify<T1, TResult>(fn: (arg1: T1) => Promise<TResult>): (arg1: T1, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
|
|
5716
5718
|
export function callbackify<T1, T2>(fn: (arg1: T1, arg2: T2) => Promise<void>): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException) => void) => void;
|
|
5717
|
-
export function callbackify<T1, T2, TResult>(fn: (arg1: T1, arg2: T2) => Promise<TResult>): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void;
|
|
5719
|
+
export function callbackify<T1, T2, TResult>(fn: (arg1: T1, arg2: T2) => Promise<TResult>): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
|
|
5718
5720
|
export function callbackify<T1, T2, T3>(fn: (arg1: T1, arg2: T2, arg3: T3) => Promise<void>): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException) => void) => void;
|
|
5719
|
-
export function callbackify<T1, T2, T3, TResult>(fn: (arg1: T1, arg2: T2, arg3: T3) => Promise<TResult>): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void;
|
|
5721
|
+
export function callbackify<T1, T2, T3, TResult>(fn: (arg1: T1, arg2: T2, arg3: T3) => Promise<TResult>): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
|
|
5720
5722
|
export function callbackify<T1, T2, T3, T4>(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<void>): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: NodeJS.ErrnoException) => void) => void;
|
|
5721
|
-
export function callbackify<T1, T2, T3, T4, TResult>(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<TResult>): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void;
|
|
5723
|
+
export function callbackify<T1, T2, T3, T4, TResult>(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<TResult>): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
|
|
5722
5724
|
export function callbackify<T1, T2, T3, T4, T5>(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<void>): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: NodeJS.ErrnoException) => void) => void;
|
|
5723
|
-
export function callbackify<T1, T2, T3, T4, T5, TResult>(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<TResult>): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void;
|
|
5725
|
+
export function callbackify<T1, T2, T3, T4, T5, TResult>(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<TResult>): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
|
|
5724
5726
|
export function callbackify<T1, T2, T3, T4, T5, T6>(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise<void>): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6, callback: (err: NodeJS.ErrnoException) => void) => void;
|
|
5725
|
-
export function callbackify<T1, T2, T3, T4, T5, T6, TResult>(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise<TResult>): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6, callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void;
|
|
5727
|
+
export function callbackify<T1, T2, T3, T4, T5, T6, TResult>(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise<TResult>): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
|
|
5726
5728
|
|
|
5727
5729
|
export function promisify<TCustom extends Function>(fn: CustomPromisify<TCustom>): TCustom;
|
|
5728
5730
|
export function promisify<TResult>(fn: (callback: (err: Error | null, result: TResult) => void) => void): () => Promise<TResult>;
|
|
5729
|
-
export function promisify(fn: (callback: (err?: Error
|
|
5731
|
+
export function promisify(fn: (callback: (err?: Error) => void) => void): () => Promise<void>;
|
|
5730
5732
|
export function promisify<T1, TResult>(fn: (arg1: T1, callback: (err: Error | null, result: TResult) => void) => void): (arg1: T1) => Promise<TResult>;
|
|
5731
|
-
export function promisify<T1>(fn: (arg1: T1, callback: (err?: Error
|
|
5733
|
+
export function promisify<T1>(fn: (arg1: T1, callback: (err?: Error) => void) => void): (arg1: T1) => Promise<void>;
|
|
5732
5734
|
export function promisify<T1, T2, TResult>(fn: (arg1: T1, arg2: T2, callback: (err: Error | null, result: TResult) => void) => void): (arg1: T1, arg2: T2) => Promise<TResult>;
|
|
5733
|
-
export function promisify<T1, T2>(fn: (arg1: T1, arg2: T2, callback: (err?: Error
|
|
5735
|
+
export function promisify<T1, T2>(fn: (arg1: T1, arg2: T2, callback: (err?: Error) => void) => void): (arg1: T1, arg2: T2) => Promise<void>;
|
|
5734
5736
|
export function promisify<T1, T2, T3, TResult>(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err: Error | null, result: TResult) => void) => void): (arg1: T1, arg2: T2, arg3: T3) => Promise<TResult>;
|
|
5735
|
-
export function promisify<T1, T2, T3>(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err?: Error
|
|
5737
|
+
export function promisify<T1, T2, T3>(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err?: Error) => void) => void): (arg1: T1, arg2: T2, arg3: T3) => Promise<void>;
|
|
5736
5738
|
export function promisify<T1, T2, T3, T4, TResult>(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: Error | null, result: TResult) => void) => void): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<TResult>;
|
|
5737
|
-
export function promisify<T1, T2, T3, T4>(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err?: Error
|
|
5739
|
+
export function promisify<T1, T2, T3, T4>(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err?: Error) => void) => void): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<void>;
|
|
5738
5740
|
export function promisify<T1, T2, T3, T4, T5, TResult>(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: Error | null, result: TResult) => void) => void): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<TResult>;
|
|
5739
|
-
export function promisify<T1, T2, T3, T4, T5>(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err?: Error
|
|
5741
|
+
export function promisify<T1, T2, T3, T4, T5>(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err?: Error) => void) => void): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<void>;
|
|
5740
5742
|
export function promisify(fn: Function): Function;
|
|
5741
5743
|
export namespace promisify {
|
|
5742
5744
|
const custom: symbol;
|
|
@@ -6367,7 +6369,7 @@ declare module "http2" {
|
|
|
6367
6369
|
}
|
|
6368
6370
|
|
|
6369
6371
|
export interface ServerStreamFileResponseOptionsWithError extends ServerStreamFileResponseOptions {
|
|
6370
|
-
onError?: (err: NodeJS.ErrnoException) => void;
|
|
6372
|
+
onError?: (err: NodeJS.ErrnoException | null) => void;
|
|
6371
6373
|
}
|
|
6372
6374
|
|
|
6373
6375
|
export interface Http2Stream extends stream.Duplex {
|
|
@@ -6708,9 +6710,7 @@ declare module "http2" {
|
|
|
6708
6710
|
export interface SecureClientSessionOptions extends ClientSessionOptions, tls.ConnectionOptions { }
|
|
6709
6711
|
export interface SecureServerSessionOptions extends ServerSessionOptions, tls.TlsOptions { }
|
|
6710
6712
|
|
|
6711
|
-
export interface ServerOptions extends ServerSessionOptions {
|
|
6712
|
-
allowHTTP1?: boolean;
|
|
6713
|
-
}
|
|
6713
|
+
export interface ServerOptions extends ServerSessionOptions { }
|
|
6714
6714
|
|
|
6715
6715
|
export interface SecureServerOptions extends SecureServerSessionOptions {
|
|
6716
6716
|
allowHTTP1?: boolean;
|
node v8/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "8.10.
|
|
3
|
+
"version": "8.10.46",
|
|
4
4
|
"description": "TypeScript definitions for Node.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"contributors": [
|
|
@@ -118,6 +118,11 @@
|
|
|
118
118
|
"name": "Jordi Oliveras Rovira",
|
|
119
119
|
"url": "https://github.com/j-oliveras",
|
|
120
120
|
"githubUsername": "j-oliveras"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"name": "Thanik Bhongbhibhat",
|
|
124
|
+
"url": "https://github.com/bhongy",
|
|
125
|
+
"githubUsername": "bhongy"
|
|
121
126
|
}
|
|
122
127
|
],
|
|
123
128
|
"main": "",
|
|
@@ -129,6 +134,6 @@
|
|
|
129
134
|
},
|
|
130
135
|
"scripts": {},
|
|
131
136
|
"dependencies": {},
|
|
132
|
-
"typesPublisherContentHash": "
|
|
137
|
+
"typesPublisherContentHash": "2ccf2054ef6cf21c07e0ebf71979f729d2ff19ab4bb96a9decf195fa3e265571",
|
|
133
138
|
"typeScriptVersion": "2.1"
|
|
134
139
|
}
|