@types/node 11.13.2 → 11.13.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- node/README.md +1 -1
- node/crypto.d.ts +9 -6
- node/dgram.d.ts +1 -1
- node/dns.d.ts +35 -35
- node/fs.d.ts +86 -69
- node/globals.d.ts +1 -1
- node/http.d.ts +1 -0
- node/package.json +2 -2
- node/stream.d.ts +7 -7
- node/util.d.ts +11 -11
node/README.md
CHANGED
|
@@ -8,7 +8,7 @@ This package contains type definitions for Node.js ( http://nodejs.org/ ).
|
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node
|
|
9
9
|
|
|
10
10
|
Additional Details
|
|
11
|
-
* Last updated:
|
|
11
|
+
* Last updated: Fri, 19 Apr 2019 19:51:02 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
13
|
* Global values: Buffer, NodeJS, Symbol, __dirname, __filename, clearImmediate, clearInterval, clearTimeout, console, exports, global, module, process, queueMicrotask, require, setImmediate, setInterval, setTimeout
|
|
14
14
|
|
node/crypto.d.ts
CHANGED
|
@@ -135,15 +135,18 @@ declare module "crypto" {
|
|
|
135
135
|
|
|
136
136
|
export type KeyObjectType = 'secret' | 'public' | 'private';
|
|
137
137
|
|
|
138
|
+
interface KeyExportOptions<T extends KeyFormat> {
|
|
139
|
+
type: 'pkcs1' | 'spki' | 'pkcs8' | 'sec1';
|
|
140
|
+
format: T;
|
|
141
|
+
cipher?: string;
|
|
142
|
+
passphrase?: string | Buffer;
|
|
143
|
+
}
|
|
144
|
+
|
|
138
145
|
class KeyObject {
|
|
139
146
|
private constructor();
|
|
140
147
|
asymmetricKeyType?: KeyType;
|
|
141
|
-
export(options
|
|
142
|
-
|
|
143
|
-
format: KeyFormat,
|
|
144
|
-
cipher?: string,
|
|
145
|
-
passphrase?: string | Buffer
|
|
146
|
-
}): string | Buffer;
|
|
148
|
+
export(options: KeyExportOptions<'pem'>): string | Buffer;
|
|
149
|
+
export(options?: KeyExportOptions<'der'>): Buffer;
|
|
147
150
|
symmetricSize?: number;
|
|
148
151
|
type: KeyObjectType;
|
|
149
152
|
}
|
node/dgram.d.ts
CHANGED
|
@@ -27,7 +27,7 @@ declare module "dgram" {
|
|
|
27
27
|
ipv6Only?: boolean;
|
|
28
28
|
recvBufferSize?: number;
|
|
29
29
|
sendBufferSize?: number;
|
|
30
|
-
lookup?: (hostname: string, options: dns.LookupOneOptions, callback: (err: NodeJS.ErrnoException, address: string, family: number) => void) => void;
|
|
30
|
+
lookup?: (hostname: string, options: dns.LookupOneOptions, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void) => void;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
function createSocket(type: SocketType, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket;
|
node/dns.d.ts
CHANGED
|
@@ -23,11 +23,11 @@ declare module "dns" {
|
|
|
23
23
|
family: number;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
function lookup(hostname: string, family: number, callback: (err: NodeJS.ErrnoException, address: string, family: number) => void): void;
|
|
27
|
-
function lookup(hostname: string, options: LookupOneOptions, callback: (err: NodeJS.ErrnoException, address: string, family: number) => void): void;
|
|
28
|
-
function lookup(hostname: string, options: LookupAllOptions, callback: (err: NodeJS.ErrnoException, addresses: LookupAddress[]) => void): void;
|
|
29
|
-
function lookup(hostname: string, options: LookupOptions, callback: (err: NodeJS.ErrnoException, address: string | LookupAddress[], family: number) => void): void;
|
|
30
|
-
function lookup(hostname: string, callback: (err: NodeJS.ErrnoException, address: string, family: number) => void): void;
|
|
26
|
+
function lookup(hostname: string, family: number, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void): void;
|
|
27
|
+
function lookup(hostname: string, options: LookupOneOptions, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void): void;
|
|
28
|
+
function lookup(hostname: string, options: LookupAllOptions, callback: (err: NodeJS.ErrnoException | null, addresses: LookupAddress[]) => void): void;
|
|
29
|
+
function lookup(hostname: string, options: LookupOptions, callback: (err: NodeJS.ErrnoException | null, address: string | LookupAddress[], family: number) => void): void;
|
|
30
|
+
function lookup(hostname: string, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void): void;
|
|
31
31
|
|
|
32
32
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
33
33
|
namespace lookup {
|
|
@@ -36,7 +36,7 @@ declare module "dns" {
|
|
|
36
36
|
function __promisify__(hostname: string, options?: LookupOptions | number): Promise<{ address: string | LookupAddress[], family?: number }>;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
function lookupService(address: string, port: number, callback: (err: NodeJS.ErrnoException, hostname: string, service: string) => void): void;
|
|
39
|
+
function lookupService(address: string, port: number, callback: (err: NodeJS.ErrnoException | null, hostname: string, service: string) => void): void;
|
|
40
40
|
|
|
41
41
|
namespace lookupService {
|
|
42
42
|
function __promisify__(address: string, port: number): Promise<{ hostname: string, service: string }>;
|
|
@@ -144,22 +144,22 @@ declare module "dns" {
|
|
|
144
144
|
AnySrvRecord |
|
|
145
145
|
AnyTxtRecord;
|
|
146
146
|
|
|
147
|
-
function resolve(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
|
148
|
-
function resolve(hostname: string, rrtype: "A", callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
|
149
|
-
function resolve(hostname: string, rrtype: "AAAA", callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
|
150
|
-
function resolve(hostname: string, rrtype: "ANY", callback: (err: NodeJS.ErrnoException, addresses: AnyRecord[]) => void): void;
|
|
151
|
-
function resolve(hostname: string, rrtype: "CNAME", callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
|
152
|
-
function resolve(hostname: string, rrtype: "MX", callback: (err: NodeJS.ErrnoException, addresses: MxRecord[]) => void): void;
|
|
153
|
-
function resolve(hostname: string, rrtype: "NAPTR", callback: (err: NodeJS.ErrnoException, addresses: NaptrRecord[]) => void): void;
|
|
154
|
-
function resolve(hostname: string, rrtype: "NS", callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
|
155
|
-
function resolve(hostname: string, rrtype: "PTR", callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
|
156
|
-
function resolve(hostname: string, rrtype: "SOA", callback: (err: NodeJS.ErrnoException, addresses: SoaRecord) => void): void;
|
|
157
|
-
function resolve(hostname: string, rrtype: "SRV", callback: (err: NodeJS.ErrnoException, addresses: SrvRecord[]) => void): void;
|
|
158
|
-
function resolve(hostname: string, rrtype: "TXT", callback: (err: NodeJS.ErrnoException, addresses: string[][]) => void): void;
|
|
147
|
+
function resolve(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
|
|
148
|
+
function resolve(hostname: string, rrtype: "A", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
|
|
149
|
+
function resolve(hostname: string, rrtype: "AAAA", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
|
|
150
|
+
function resolve(hostname: string, rrtype: "ANY", callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void): void;
|
|
151
|
+
function resolve(hostname: string, rrtype: "CNAME", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
|
|
152
|
+
function resolve(hostname: string, rrtype: "MX", callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void): void;
|
|
153
|
+
function resolve(hostname: string, rrtype: "NAPTR", callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void): void;
|
|
154
|
+
function resolve(hostname: string, rrtype: "NS", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
|
|
155
|
+
function resolve(hostname: string, rrtype: "PTR", callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
|
|
156
|
+
function resolve(hostname: string, rrtype: "SOA", callback: (err: NodeJS.ErrnoException | null, addresses: SoaRecord) => void): void;
|
|
157
|
+
function resolve(hostname: string, rrtype: "SRV", callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void): void;
|
|
158
|
+
function resolve(hostname: string, rrtype: "TXT", callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void): void;
|
|
159
159
|
function resolve(
|
|
160
160
|
hostname: string,
|
|
161
161
|
rrtype: string,
|
|
162
|
-
callback: (err: NodeJS.ErrnoException, addresses: string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]) => void,
|
|
162
|
+
callback: (err: NodeJS.ErrnoException | null, addresses: string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]) => void,
|
|
163
163
|
): void;
|
|
164
164
|
|
|
165
165
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
@@ -174,9 +174,9 @@ declare module "dns" {
|
|
|
174
174
|
function __promisify__(hostname: string, rrtype: string): Promise<string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]>;
|
|
175
175
|
}
|
|
176
176
|
|
|
177
|
-
function resolve4(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
|
178
|
-
function resolve4(hostname: string, options: ResolveWithTtlOptions, callback: (err: NodeJS.ErrnoException, addresses: RecordWithTtl[]) => void): void;
|
|
179
|
-
function resolve4(hostname: string, options: ResolveOptions, callback: (err: NodeJS.ErrnoException, addresses: string[] | RecordWithTtl[]) => void): void;
|
|
177
|
+
function resolve4(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
|
|
178
|
+
function resolve4(hostname: string, options: ResolveWithTtlOptions, callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void): void;
|
|
179
|
+
function resolve4(hostname: string, options: ResolveOptions, callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void): void;
|
|
180
180
|
|
|
181
181
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
182
182
|
namespace resolve4 {
|
|
@@ -185,9 +185,9 @@ declare module "dns" {
|
|
|
185
185
|
function __promisify__(hostname: string, options?: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
|
|
186
186
|
}
|
|
187
187
|
|
|
188
|
-
function resolve6(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
|
189
|
-
function resolve6(hostname: string, options: ResolveWithTtlOptions, callback: (err: NodeJS.ErrnoException, addresses: RecordWithTtl[]) => void): void;
|
|
190
|
-
function resolve6(hostname: string, options: ResolveOptions, callback: (err: NodeJS.ErrnoException, addresses: string[] | RecordWithTtl[]) => void): void;
|
|
188
|
+
function resolve6(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
|
|
189
|
+
function resolve6(hostname: string, options: ResolveWithTtlOptions, callback: (err: NodeJS.ErrnoException | null, addresses: RecordWithTtl[]) => void): void;
|
|
190
|
+
function resolve6(hostname: string, options: ResolveOptions, callback: (err: NodeJS.ErrnoException | null, addresses: string[] | RecordWithTtl[]) => void): void;
|
|
191
191
|
|
|
192
192
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
193
193
|
namespace resolve6 {
|
|
@@ -196,52 +196,52 @@ declare module "dns" {
|
|
|
196
196
|
function __promisify__(hostname: string, options?: ResolveOptions): Promise<string[] | RecordWithTtl[]>;
|
|
197
197
|
}
|
|
198
198
|
|
|
199
|
-
function resolveCname(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
|
199
|
+
function resolveCname(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
|
|
200
200
|
namespace resolveCname {
|
|
201
201
|
function __promisify__(hostname: string): Promise<string[]>;
|
|
202
202
|
}
|
|
203
203
|
|
|
204
|
-
function resolveMx(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: MxRecord[]) => void): void;
|
|
204
|
+
function resolveMx(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: MxRecord[]) => void): void;
|
|
205
205
|
namespace resolveMx {
|
|
206
206
|
function __promisify__(hostname: string): Promise<MxRecord[]>;
|
|
207
207
|
}
|
|
208
208
|
|
|
209
|
-
function resolveNaptr(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: NaptrRecord[]) => void): void;
|
|
209
|
+
function resolveNaptr(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: NaptrRecord[]) => void): void;
|
|
210
210
|
namespace resolveNaptr {
|
|
211
211
|
function __promisify__(hostname: string): Promise<NaptrRecord[]>;
|
|
212
212
|
}
|
|
213
213
|
|
|
214
|
-
function resolveNs(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
|
214
|
+
function resolveNs(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
|
|
215
215
|
namespace resolveNs {
|
|
216
216
|
function __promisify__(hostname: string): Promise<string[]>;
|
|
217
217
|
}
|
|
218
218
|
|
|
219
|
-
function resolvePtr(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[]) => void): void;
|
|
219
|
+
function resolvePtr(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[]) => void): void;
|
|
220
220
|
namespace resolvePtr {
|
|
221
221
|
function __promisify__(hostname: string): Promise<string[]>;
|
|
222
222
|
}
|
|
223
223
|
|
|
224
|
-
function resolveSoa(hostname: string, callback: (err: NodeJS.ErrnoException, address: SoaRecord) => void): void;
|
|
224
|
+
function resolveSoa(hostname: string, callback: (err: NodeJS.ErrnoException | null, address: SoaRecord) => void): void;
|
|
225
225
|
namespace resolveSoa {
|
|
226
226
|
function __promisify__(hostname: string): Promise<SoaRecord>;
|
|
227
227
|
}
|
|
228
228
|
|
|
229
|
-
function resolveSrv(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: SrvRecord[]) => void): void;
|
|
229
|
+
function resolveSrv(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: SrvRecord[]) => void): void;
|
|
230
230
|
namespace resolveSrv {
|
|
231
231
|
function __promisify__(hostname: string): Promise<SrvRecord[]>;
|
|
232
232
|
}
|
|
233
233
|
|
|
234
|
-
function resolveTxt(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: string[][]) => void): void;
|
|
234
|
+
function resolveTxt(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: string[][]) => void): void;
|
|
235
235
|
namespace resolveTxt {
|
|
236
236
|
function __promisify__(hostname: string): Promise<string[][]>;
|
|
237
237
|
}
|
|
238
238
|
|
|
239
|
-
function resolveAny(hostname: string, callback: (err: NodeJS.ErrnoException, addresses: AnyRecord[]) => void): void;
|
|
239
|
+
function resolveAny(hostname: string, callback: (err: NodeJS.ErrnoException | null, addresses: AnyRecord[]) => void): void;
|
|
240
240
|
namespace resolveAny {
|
|
241
241
|
function __promisify__(hostname: string): Promise<AnyRecord[]>;
|
|
242
242
|
}
|
|
243
243
|
|
|
244
|
-
function reverse(ip: string, callback: (err: NodeJS.ErrnoException, hostnames: string[]) => void): void;
|
|
244
|
+
function reverse(ip: string, callback: (err: NodeJS.ErrnoException | null, hostnames: string[]) => void): void;
|
|
245
245
|
function setServers(servers: string[]): void;
|
|
246
246
|
function getServers(): string[];
|
|
247
247
|
|
node/fs.d.ts
CHANGED
|
@@ -146,7 +146,7 @@ declare module "fs" {
|
|
|
146
146
|
* @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
147
147
|
* URL support is _experimental_.
|
|
148
148
|
*/
|
|
149
|
-
function rename(oldPath: PathLike, newPath: PathLike, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
149
|
+
function rename(oldPath: PathLike, newPath: PathLike, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
150
150
|
|
|
151
151
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
152
152
|
namespace rename {
|
|
@@ -174,14 +174,14 @@ declare module "fs" {
|
|
|
174
174
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
175
175
|
* @param len If not specified, defaults to `0`.
|
|
176
176
|
*/
|
|
177
|
-
function truncate(path: PathLike, len: number | undefined | null, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
177
|
+
function truncate(path: PathLike, len: number | undefined | null, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
178
178
|
|
|
179
179
|
/**
|
|
180
180
|
* Asynchronous truncate(2) - Truncate a file to a specified length.
|
|
181
181
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
182
182
|
* URL support is _experimental_.
|
|
183
183
|
*/
|
|
184
|
-
function truncate(path: PathLike, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
184
|
+
function truncate(path: PathLike, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
185
185
|
|
|
186
186
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
187
187
|
namespace truncate {
|
|
@@ -205,13 +205,13 @@ declare module "fs" {
|
|
|
205
205
|
* @param fd A file descriptor.
|
|
206
206
|
* @param len If not specified, defaults to `0`.
|
|
207
207
|
*/
|
|
208
|
-
function ftruncate(fd: number, len: number | undefined | null, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
208
|
+
function ftruncate(fd: number, len: number | undefined | null, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
209
209
|
|
|
210
210
|
/**
|
|
211
211
|
* Asynchronous ftruncate(2) - Truncate a file to a specified length.
|
|
212
212
|
* @param fd A file descriptor.
|
|
213
213
|
*/
|
|
214
|
-
function ftruncate(fd: number, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
214
|
+
function ftruncate(fd: number, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
215
215
|
|
|
216
216
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
217
217
|
namespace ftruncate {
|
|
@@ -234,7 +234,7 @@ declare module "fs" {
|
|
|
234
234
|
* Asynchronous chown(2) - Change ownership of a file.
|
|
235
235
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
236
236
|
*/
|
|
237
|
-
function chown(path: PathLike, uid: number, gid: number, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
237
|
+
function chown(path: PathLike, uid: number, gid: number, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
238
238
|
|
|
239
239
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
240
240
|
namespace chown {
|
|
@@ -255,7 +255,7 @@ declare module "fs" {
|
|
|
255
255
|
* Asynchronous fchown(2) - Change ownership of a file.
|
|
256
256
|
* @param fd A file descriptor.
|
|
257
257
|
*/
|
|
258
|
-
function fchown(fd: number, uid: number, gid: number, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
258
|
+
function fchown(fd: number, uid: number, gid: number, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
259
259
|
|
|
260
260
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
261
261
|
namespace fchown {
|
|
@@ -276,7 +276,7 @@ declare module "fs" {
|
|
|
276
276
|
* Asynchronous lchown(2) - Change ownership of a file. Does not dereference symbolic links.
|
|
277
277
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
278
278
|
*/
|
|
279
|
-
function lchown(path: PathLike, uid: number, gid: number, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
279
|
+
function lchown(path: PathLike, uid: number, gid: number, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
280
280
|
|
|
281
281
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
282
282
|
namespace lchown {
|
|
@@ -298,7 +298,7 @@ declare module "fs" {
|
|
|
298
298
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
299
299
|
* @param mode A file mode. If a string is passed, it is parsed as an octal integer.
|
|
300
300
|
*/
|
|
301
|
-
function chmod(path: PathLike, mode: string | number, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
301
|
+
function chmod(path: PathLike, mode: string | number, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
302
302
|
|
|
303
303
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
304
304
|
namespace chmod {
|
|
@@ -322,7 +322,7 @@ declare module "fs" {
|
|
|
322
322
|
* @param fd A file descriptor.
|
|
323
323
|
* @param mode A file mode. If a string is passed, it is parsed as an octal integer.
|
|
324
324
|
*/
|
|
325
|
-
function fchmod(fd: number, mode: string | number, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
325
|
+
function fchmod(fd: number, mode: string | number, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
326
326
|
|
|
327
327
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
328
328
|
namespace fchmod {
|
|
@@ -346,7 +346,7 @@ declare module "fs" {
|
|
|
346
346
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
347
347
|
* @param mode A file mode. If a string is passed, it is parsed as an octal integer.
|
|
348
348
|
*/
|
|
349
|
-
function lchmod(path: PathLike, mode: string | number, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
349
|
+
function lchmod(path: PathLike, mode: string | number, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
350
350
|
|
|
351
351
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
352
352
|
namespace lchmod {
|
|
@@ -369,7 +369,7 @@ declare module "fs" {
|
|
|
369
369
|
* Asynchronous stat(2) - Get file status.
|
|
370
370
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
371
371
|
*/
|
|
372
|
-
function stat(path: PathLike, callback: (err: NodeJS.ErrnoException, stats: Stats) => void): void;
|
|
372
|
+
function stat(path: PathLike, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void;
|
|
373
373
|
|
|
374
374
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
375
375
|
namespace stat {
|
|
@@ -390,7 +390,7 @@ declare module "fs" {
|
|
|
390
390
|
* Asynchronous fstat(2) - Get file status.
|
|
391
391
|
* @param fd A file descriptor.
|
|
392
392
|
*/
|
|
393
|
-
function fstat(fd: number, callback: (err: NodeJS.ErrnoException, stats: Stats) => void): void;
|
|
393
|
+
function fstat(fd: number, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void;
|
|
394
394
|
|
|
395
395
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
396
396
|
namespace fstat {
|
|
@@ -411,7 +411,7 @@ declare module "fs" {
|
|
|
411
411
|
* Asynchronous lstat(2) - Get file status. Does not dereference symbolic links.
|
|
412
412
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
413
413
|
*/
|
|
414
|
-
function lstat(path: PathLike, callback: (err: NodeJS.ErrnoException, stats: Stats) => void): void;
|
|
414
|
+
function lstat(path: PathLike, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void;
|
|
415
415
|
|
|
416
416
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
417
417
|
namespace lstat {
|
|
@@ -433,7 +433,7 @@ declare module "fs" {
|
|
|
433
433
|
* @param existingPath A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
434
434
|
* @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
435
435
|
*/
|
|
436
|
-
function link(existingPath: PathLike, newPath: PathLike, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
436
|
+
function link(existingPath: PathLike, newPath: PathLike, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
437
437
|
|
|
438
438
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
439
439
|
namespace link {
|
|
@@ -459,14 +459,14 @@ declare module "fs" {
|
|
|
459
459
|
* @param type May be set to `'dir'`, `'file'`, or `'junction'` (default is `'file'`) and is only available on Windows (ignored on other platforms).
|
|
460
460
|
* When using `'junction'`, the `target` argument will automatically be normalized to an absolute path.
|
|
461
461
|
*/
|
|
462
|
-
function symlink(target: PathLike, path: PathLike, type: symlink.Type | undefined | null, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
462
|
+
function symlink(target: PathLike, path: PathLike, type: symlink.Type | undefined | null, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
463
463
|
|
|
464
464
|
/**
|
|
465
465
|
* Asynchronous symlink(2) - Create a new symbolic link to an existing file.
|
|
466
466
|
* @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol.
|
|
467
467
|
* @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol.
|
|
468
468
|
*/
|
|
469
|
-
function symlink(target: PathLike, path: PathLike, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
469
|
+
function symlink(target: PathLike, path: PathLike, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
470
470
|
|
|
471
471
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
472
472
|
namespace symlink {
|
|
@@ -496,27 +496,31 @@ declare module "fs" {
|
|
|
496
496
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
497
497
|
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
498
498
|
*/
|
|
499
|
-
function readlink(
|
|
499
|
+
function readlink(
|
|
500
|
+
path: PathLike,
|
|
501
|
+
options: { encoding?: BufferEncoding | null } | BufferEncoding | undefined | null,
|
|
502
|
+
callback: (err: NodeJS.ErrnoException | null, linkString: string) => void
|
|
503
|
+
): void;
|
|
500
504
|
|
|
501
505
|
/**
|
|
502
506
|
* Asynchronous readlink(2) - read value of a symbolic link.
|
|
503
507
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
504
508
|
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
505
509
|
*/
|
|
506
|
-
function readlink(path: PathLike, options: { encoding: "buffer" } | "buffer", callback: (err: NodeJS.ErrnoException, linkString: Buffer) => void): void;
|
|
510
|
+
function readlink(path: PathLike, options: { encoding: "buffer" } | "buffer", callback: (err: NodeJS.ErrnoException | null, linkString: Buffer) => void): void;
|
|
507
511
|
|
|
508
512
|
/**
|
|
509
513
|
* Asynchronous readlink(2) - read value of a symbolic link.
|
|
510
514
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
511
515
|
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
512
516
|
*/
|
|
513
|
-
function readlink(path: PathLike, options: { encoding?: string | null } | string | undefined | null, callback: (err: NodeJS.ErrnoException, linkString: string | Buffer) => void): void;
|
|
517
|
+
function readlink(path: PathLike, options: { encoding?: string | null } | string | undefined | null, callback: (err: NodeJS.ErrnoException | null, linkString: string | Buffer) => void): void;
|
|
514
518
|
|
|
515
519
|
/**
|
|
516
520
|
* Asynchronous readlink(2) - read value of a symbolic link.
|
|
517
521
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
518
522
|
*/
|
|
519
|
-
function readlink(path: PathLike, callback: (err: NodeJS.ErrnoException, linkString: string) => void): void;
|
|
523
|
+
function readlink(path: PathLike, callback: (err: NodeJS.ErrnoException | null, linkString: string) => void): void;
|
|
520
524
|
|
|
521
525
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
522
526
|
namespace readlink {
|
|
@@ -568,27 +572,31 @@ declare module "fs" {
|
|
|
568
572
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
569
573
|
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
570
574
|
*/
|
|
571
|
-
function realpath(
|
|
575
|
+
function realpath(
|
|
576
|
+
path: PathLike,
|
|
577
|
+
options: { encoding?: BufferEncoding | null } | BufferEncoding | undefined | null,
|
|
578
|
+
callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void
|
|
579
|
+
): void;
|
|
572
580
|
|
|
573
581
|
/**
|
|
574
582
|
* Asynchronous realpath(3) - return the canonicalized absolute pathname.
|
|
575
583
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
576
584
|
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
577
585
|
*/
|
|
578
|
-
function realpath(path: PathLike, options: { encoding: "buffer" } | "buffer", callback: (err: NodeJS.ErrnoException, resolvedPath: Buffer) => void): void;
|
|
586
|
+
function realpath(path: PathLike, options: { encoding: "buffer" } | "buffer", callback: (err: NodeJS.ErrnoException | null, resolvedPath: Buffer) => void): void;
|
|
579
587
|
|
|
580
588
|
/**
|
|
581
589
|
* Asynchronous realpath(3) - return the canonicalized absolute pathname.
|
|
582
590
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
583
591
|
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
584
592
|
*/
|
|
585
|
-
function realpath(path: PathLike, options: { encoding?: string | null } | string | undefined | null, callback: (err: NodeJS.ErrnoException, resolvedPath: string | Buffer) => void): void;
|
|
593
|
+
function realpath(path: PathLike, options: { encoding?: string | null } | string | undefined | null, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string | Buffer) => void): void;
|
|
586
594
|
|
|
587
595
|
/**
|
|
588
596
|
* Asynchronous realpath(3) - return the canonicalized absolute pathname.
|
|
589
597
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
590
598
|
*/
|
|
591
|
-
function realpath(path: PathLike, callback: (err: NodeJS.ErrnoException, resolvedPath: string) => void): void;
|
|
599
|
+
function realpath(path: PathLike, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void): void;
|
|
592
600
|
|
|
593
601
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
594
602
|
namespace realpath {
|
|
@@ -613,10 +621,14 @@ declare module "fs" {
|
|
|
613
621
|
*/
|
|
614
622
|
function __promisify__(path: PathLike, options?: { encoding?: string | null } | string | null): Promise<string | Buffer>;
|
|
615
623
|
|
|
616
|
-
function native(
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
624
|
+
function native(
|
|
625
|
+
path: PathLike,
|
|
626
|
+
options: { encoding?: BufferEncoding | null } | BufferEncoding | undefined | null,
|
|
627
|
+
callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void
|
|
628
|
+
): void;
|
|
629
|
+
function native(path: PathLike, options: { encoding: "buffer" } | "buffer", callback: (err: NodeJS.ErrnoException | null, resolvedPath: Buffer) => void): void;
|
|
630
|
+
function native(path: PathLike, options: { encoding?: string | null } | string | undefined | null, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string | Buffer) => void): void;
|
|
631
|
+
function native(path: PathLike, callback: (err: NodeJS.ErrnoException | null, resolvedPath: string) => void): void;
|
|
620
632
|
}
|
|
621
633
|
|
|
622
634
|
/**
|
|
@@ -650,7 +662,7 @@ declare module "fs" {
|
|
|
650
662
|
* Asynchronous unlink(2) - delete a name and possibly the file it refers to.
|
|
651
663
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
652
664
|
*/
|
|
653
|
-
function unlink(path: PathLike, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
665
|
+
function unlink(path: PathLike, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
654
666
|
|
|
655
667
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
656
668
|
namespace unlink {
|
|
@@ -671,7 +683,7 @@ declare module "fs" {
|
|
|
671
683
|
* Asynchronous rmdir(2) - delete a directory.
|
|
672
684
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
673
685
|
*/
|
|
674
|
-
function rmdir(path: PathLike, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
686
|
+
function rmdir(path: PathLike, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
675
687
|
|
|
676
688
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
677
689
|
namespace rmdir {
|
|
@@ -707,13 +719,13 @@ declare module "fs" {
|
|
|
707
719
|
* @param options Either the file mode, or an object optionally specifying the file mode and whether parent folders
|
|
708
720
|
* should be created. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
|
|
709
721
|
*/
|
|
710
|
-
function mkdir(path: PathLike, options: number | string | MakeDirectoryOptions | undefined | null, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
722
|
+
function mkdir(path: PathLike, options: number | string | MakeDirectoryOptions | undefined | null, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
711
723
|
|
|
712
724
|
/**
|
|
713
725
|
* Asynchronous mkdir(2) - create a directory with a mode of `0o777`.
|
|
714
726
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
715
727
|
*/
|
|
716
|
-
function mkdir(path: PathLike, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
728
|
+
function mkdir(path: PathLike, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
717
729
|
|
|
718
730
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
719
731
|
namespace mkdir {
|
|
@@ -739,27 +751,27 @@ declare module "fs" {
|
|
|
739
751
|
* Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
|
|
740
752
|
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
741
753
|
*/
|
|
742
|
-
function mkdtemp(prefix: string, options: { encoding?: BufferEncoding | null } | BufferEncoding | undefined | null, callback: (err: NodeJS.ErrnoException, folder: string) => void): void;
|
|
754
|
+
function mkdtemp(prefix: string, options: { encoding?: BufferEncoding | null } | BufferEncoding | undefined | null, callback: (err: NodeJS.ErrnoException | null, folder: string) => void): void;
|
|
743
755
|
|
|
744
756
|
/**
|
|
745
757
|
* Asynchronously creates a unique temporary directory.
|
|
746
758
|
* Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
|
|
747
759
|
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
748
760
|
*/
|
|
749
|
-
function mkdtemp(prefix: string, options: "buffer" | { encoding: "buffer" }, callback: (err: NodeJS.ErrnoException, folder: Buffer) => void): void;
|
|
761
|
+
function mkdtemp(prefix: string, options: "buffer" | { encoding: "buffer" }, callback: (err: NodeJS.ErrnoException | null, folder: Buffer) => void): void;
|
|
750
762
|
|
|
751
763
|
/**
|
|
752
764
|
* Asynchronously creates a unique temporary directory.
|
|
753
765
|
* Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
|
|
754
766
|
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
755
767
|
*/
|
|
756
|
-
function mkdtemp(prefix: string, options: { encoding?: string | null } | string | undefined | null, callback: (err: NodeJS.ErrnoException, folder: string | Buffer) => void): void;
|
|
768
|
+
function mkdtemp(prefix: string, options: { encoding?: string | null } | string | undefined | null, callback: (err: NodeJS.ErrnoException | null, folder: string | Buffer) => void): void;
|
|
757
769
|
|
|
758
770
|
/**
|
|
759
771
|
* Asynchronously creates a unique temporary directory.
|
|
760
772
|
* Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
|
|
761
773
|
*/
|
|
762
|
-
function mkdtemp(prefix: string, callback: (err: NodeJS.ErrnoException, folder: string) => void): void;
|
|
774
|
+
function mkdtemp(prefix: string, callback: (err: NodeJS.ErrnoException | null, folder: string) => void): void;
|
|
763
775
|
|
|
764
776
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
765
777
|
namespace mkdtemp {
|
|
@@ -814,7 +826,7 @@ declare module "fs" {
|
|
|
814
826
|
function readdir(
|
|
815
827
|
path: PathLike,
|
|
816
828
|
options: { encoding: BufferEncoding | null; withFileTypes?: false } | BufferEncoding | undefined | null,
|
|
817
|
-
callback: (err: NodeJS.ErrnoException, files: string[]) => void,
|
|
829
|
+
callback: (err: NodeJS.ErrnoException | null, files: string[]) => void,
|
|
818
830
|
): void;
|
|
819
831
|
|
|
820
832
|
/**
|
|
@@ -822,7 +834,7 @@ declare module "fs" {
|
|
|
822
834
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
823
835
|
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
824
836
|
*/
|
|
825
|
-
function readdir(path: PathLike, options: { encoding: "buffer"; withFileTypes?: false } | "buffer", callback: (err: NodeJS.ErrnoException, files: Buffer[]) => void): void;
|
|
837
|
+
function readdir(path: PathLike, options: { encoding: "buffer"; withFileTypes?: false } | "buffer", callback: (err: NodeJS.ErrnoException | null, files: Buffer[]) => void): void;
|
|
826
838
|
|
|
827
839
|
/**
|
|
828
840
|
* Asynchronous readdir(3) - read a directory.
|
|
@@ -832,21 +844,21 @@ declare module "fs" {
|
|
|
832
844
|
function readdir(
|
|
833
845
|
path: PathLike,
|
|
834
846
|
options: { encoding?: string | null; withFileTypes?: false } | string | undefined | null,
|
|
835
|
-
callback: (err: NodeJS.ErrnoException, files: string[] | Buffer[]) => void,
|
|
847
|
+
callback: (err: NodeJS.ErrnoException | null, files: string[] | Buffer[]) => void,
|
|
836
848
|
): void;
|
|
837
849
|
|
|
838
850
|
/**
|
|
839
851
|
* Asynchronous readdir(3) - read a directory.
|
|
840
852
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
841
853
|
*/
|
|
842
|
-
function readdir(path: PathLike, callback: (err: NodeJS.ErrnoException, files: string[]) => void): void;
|
|
854
|
+
function readdir(path: PathLike, callback: (err: NodeJS.ErrnoException | null, files: string[]) => void): void;
|
|
843
855
|
|
|
844
856
|
/**
|
|
845
857
|
* Asynchronous readdir(3) - read a directory.
|
|
846
858
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
847
859
|
* @param options If called with `withFileTypes: true` the result data will be an array of Dirent.
|
|
848
860
|
*/
|
|
849
|
-
function readdir(path: PathLike, options: { withFileTypes: true }, callback: (err: NodeJS.ErrnoException, files: Dirent[]) => void): void;
|
|
861
|
+
function readdir(path: PathLike, options: { withFileTypes: true }, callback: (err: NodeJS.ErrnoException | null, files: Dirent[]) => void): void;
|
|
850
862
|
|
|
851
863
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
852
864
|
namespace readdir {
|
|
@@ -911,7 +923,7 @@ declare module "fs" {
|
|
|
911
923
|
* Asynchronous close(2) - close a file descriptor.
|
|
912
924
|
* @param fd A file descriptor.
|
|
913
925
|
*/
|
|
914
|
-
function close(fd: number, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
926
|
+
function close(fd: number, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
915
927
|
|
|
916
928
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
917
929
|
namespace close {
|
|
@@ -933,13 +945,13 @@ declare module "fs" {
|
|
|
933
945
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
934
946
|
* @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not supplied, defaults to `0o666`.
|
|
935
947
|
*/
|
|
936
|
-
function open(path: PathLike, flags: string | number, mode: string | number | undefined | null, callback: (err: NodeJS.ErrnoException, fd: number) => void): void;
|
|
948
|
+
function open(path: PathLike, flags: string | number, mode: string | number | undefined | null, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void;
|
|
937
949
|
|
|
938
950
|
/**
|
|
939
951
|
* Asynchronous open(2) - open and possibly create a file. If the file is created, its mode will be `0o666`.
|
|
940
952
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
941
953
|
*/
|
|
942
|
-
function open(path: PathLike, flags: string | number, callback: (err: NodeJS.ErrnoException, fd: number) => void): void;
|
|
954
|
+
function open(path: PathLike, flags: string | number, callback: (err: NodeJS.ErrnoException | null, fd: number) => void): void;
|
|
943
955
|
|
|
944
956
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
945
957
|
namespace open {
|
|
@@ -964,7 +976,7 @@ declare module "fs" {
|
|
|
964
976
|
* @param atime The last access time. If a string is provided, it will be coerced to number.
|
|
965
977
|
* @param mtime The last modified time. If a string is provided, it will be coerced to number.
|
|
966
978
|
*/
|
|
967
|
-
function utimes(path: PathLike, atime: string | number | Date, mtime: string | number | Date, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
979
|
+
function utimes(path: PathLike, atime: string | number | Date, mtime: string | number | Date, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
968
980
|
|
|
969
981
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
970
982
|
namespace utimes {
|
|
@@ -991,7 +1003,7 @@ declare module "fs" {
|
|
|
991
1003
|
* @param atime The last access time. If a string is provided, it will be coerced to number.
|
|
992
1004
|
* @param mtime The last modified time. If a string is provided, it will be coerced to number.
|
|
993
1005
|
*/
|
|
994
|
-
function futimes(fd: number, atime: string | number | Date, mtime: string | number | Date, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
1006
|
+
function futimes(fd: number, atime: string | number | Date, mtime: string | number | Date, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
995
1007
|
|
|
996
1008
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
997
1009
|
namespace futimes {
|
|
@@ -1016,7 +1028,7 @@ declare module "fs" {
|
|
|
1016
1028
|
* Asynchronous fsync(2) - synchronize a file's in-core state with the underlying storage device.
|
|
1017
1029
|
* @param fd A file descriptor.
|
|
1018
1030
|
*/
|
|
1019
|
-
function fsync(fd: number, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
1031
|
+
function fsync(fd: number, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
1020
1032
|
|
|
1021
1033
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
1022
1034
|
namespace fsync {
|
|
@@ -1046,7 +1058,7 @@ declare module "fs" {
|
|
|
1046
1058
|
offset: number | undefined | null,
|
|
1047
1059
|
length: number | undefined | null,
|
|
1048
1060
|
position: number | undefined | null,
|
|
1049
|
-
callback: (err: NodeJS.ErrnoException, written: number, buffer: TBuffer) => void,
|
|
1061
|
+
callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void,
|
|
1050
1062
|
): void;
|
|
1051
1063
|
|
|
1052
1064
|
/**
|
|
@@ -1060,7 +1072,7 @@ declare module "fs" {
|
|
|
1060
1072
|
buffer: TBuffer,
|
|
1061
1073
|
offset: number | undefined | null,
|
|
1062
1074
|
length: number | undefined | null,
|
|
1063
|
-
callback: (err: NodeJS.ErrnoException, written: number, buffer: TBuffer) => void,
|
|
1075
|
+
callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void,
|
|
1064
1076
|
): void;
|
|
1065
1077
|
|
|
1066
1078
|
/**
|
|
@@ -1068,13 +1080,18 @@ declare module "fs" {
|
|
|
1068
1080
|
* @param fd A file descriptor.
|
|
1069
1081
|
* @param offset The part of the buffer to be written. If not supplied, defaults to `0`.
|
|
1070
1082
|
*/
|
|
1071
|
-
function write<TBuffer extends BinaryData>(
|
|
1083
|
+
function write<TBuffer extends BinaryData>(
|
|
1084
|
+
fd: number,
|
|
1085
|
+
buffer: TBuffer,
|
|
1086
|
+
offset: number | undefined | null,
|
|
1087
|
+
callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void
|
|
1088
|
+
): void;
|
|
1072
1089
|
|
|
1073
1090
|
/**
|
|
1074
1091
|
* Asynchronously writes `buffer` to the file referenced by the supplied file descriptor.
|
|
1075
1092
|
* @param fd A file descriptor.
|
|
1076
1093
|
*/
|
|
1077
|
-
function write<TBuffer extends BinaryData>(fd: number, buffer: TBuffer, callback: (err: NodeJS.ErrnoException, written: number, buffer: TBuffer) => void): void;
|
|
1094
|
+
function write<TBuffer extends BinaryData>(fd: number, buffer: TBuffer, callback: (err: NodeJS.ErrnoException | null, written: number, buffer: TBuffer) => void): void;
|
|
1078
1095
|
|
|
1079
1096
|
/**
|
|
1080
1097
|
* Asynchronously writes `string` to the file referenced by the supplied file descriptor.
|
|
@@ -1088,7 +1105,7 @@ declare module "fs" {
|
|
|
1088
1105
|
string: any,
|
|
1089
1106
|
position: number | undefined | null,
|
|
1090
1107
|
encoding: string | undefined | null,
|
|
1091
|
-
callback: (err: NodeJS.ErrnoException, written: number, str: string) => void,
|
|
1108
|
+
callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void,
|
|
1092
1109
|
): void;
|
|
1093
1110
|
|
|
1094
1111
|
/**
|
|
@@ -1097,14 +1114,14 @@ declare module "fs" {
|
|
|
1097
1114
|
* @param string A string to write. If something other than a string is supplied it will be coerced to a string.
|
|
1098
1115
|
* @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
|
|
1099
1116
|
*/
|
|
1100
|
-
function write(fd: number, string: any, position: number | undefined | null, callback: (err: NodeJS.ErrnoException, written: number, str: string) => void): void;
|
|
1117
|
+
function write(fd: number, string: any, position: number | undefined | null, callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void): void;
|
|
1101
1118
|
|
|
1102
1119
|
/**
|
|
1103
1120
|
* Asynchronously writes `string` to the file referenced by the supplied file descriptor.
|
|
1104
1121
|
* @param fd A file descriptor.
|
|
1105
1122
|
* @param string A string to write. If something other than a string is supplied it will be coerced to a string.
|
|
1106
1123
|
*/
|
|
1107
|
-
function write(fd: number, string: any, callback: (err: NodeJS.ErrnoException, written: number, str: string) => void): void;
|
|
1124
|
+
function write(fd: number, string: any, callback: (err: NodeJS.ErrnoException | null, written: number, str: string) => void): void;
|
|
1108
1125
|
|
|
1109
1126
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
1110
1127
|
namespace write {
|
|
@@ -1165,7 +1182,7 @@ declare module "fs" {
|
|
|
1165
1182
|
offset: number,
|
|
1166
1183
|
length: number,
|
|
1167
1184
|
position: number | null,
|
|
1168
|
-
callback: (err: NodeJS.ErrnoException, bytesRead: number, buffer: TBuffer) => void,
|
|
1185
|
+
callback: (err: NodeJS.ErrnoException | null, bytesRead: number, buffer: TBuffer) => void,
|
|
1169
1186
|
): void;
|
|
1170
1187
|
|
|
1171
1188
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
@@ -1197,7 +1214,7 @@ declare module "fs" {
|
|
|
1197
1214
|
* @param options An object that may contain an optional flag.
|
|
1198
1215
|
* If a flag is not provided, it defaults to `'r'`.
|
|
1199
1216
|
*/
|
|
1200
|
-
function readFile(path: PathLike | number, options: { encoding?: null; flag?: string; } | undefined | null, callback: (err: NodeJS.ErrnoException, data: Buffer) => void): void;
|
|
1217
|
+
function readFile(path: PathLike | number, options: { encoding?: null; flag?: string; } | undefined | null, callback: (err: NodeJS.ErrnoException | null, data: Buffer) => void): void;
|
|
1201
1218
|
|
|
1202
1219
|
/**
|
|
1203
1220
|
* Asynchronously reads the entire contents of a file.
|
|
@@ -1207,7 +1224,7 @@ declare module "fs" {
|
|
|
1207
1224
|
* @param options Either the encoding for the result, or an object that contains the encoding and an optional flag.
|
|
1208
1225
|
* If a flag is not provided, it defaults to `'r'`.
|
|
1209
1226
|
*/
|
|
1210
|
-
function readFile(path: PathLike | number, options: { encoding: string; flag?: string; } | string, callback: (err: NodeJS.ErrnoException, data: string) => void): void;
|
|
1227
|
+
function readFile(path: PathLike | number, options: { encoding: string; flag?: string; } | string, callback: (err: NodeJS.ErrnoException | null, data: string) => void): void;
|
|
1211
1228
|
|
|
1212
1229
|
/**
|
|
1213
1230
|
* Asynchronously reads the entire contents of a file.
|
|
@@ -1220,7 +1237,7 @@ declare module "fs" {
|
|
|
1220
1237
|
function readFile(
|
|
1221
1238
|
path: PathLike | number,
|
|
1222
1239
|
options: { encoding?: string | null; flag?: string; } | string | undefined | null,
|
|
1223
|
-
callback: (err: NodeJS.ErrnoException, data: string | Buffer) => void,
|
|
1240
|
+
callback: (err: NodeJS.ErrnoException | null, data: string | Buffer) => void,
|
|
1224
1241
|
): void;
|
|
1225
1242
|
|
|
1226
1243
|
/**
|
|
@@ -1228,7 +1245,7 @@ declare module "fs" {
|
|
|
1228
1245
|
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
1229
1246
|
* If a file descriptor is provided, the underlying file will _not_ be closed automatically.
|
|
1230
1247
|
*/
|
|
1231
|
-
function readFile(path: PathLike | number, callback: (err: NodeJS.ErrnoException, data: Buffer) => void): void;
|
|
1248
|
+
function readFile(path: PathLike | number, callback: (err: NodeJS.ErrnoException | null, data: Buffer) => void): void;
|
|
1232
1249
|
|
|
1233
1250
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
1234
1251
|
namespace readFile {
|
|
@@ -1305,7 +1322,7 @@ declare module "fs" {
|
|
|
1305
1322
|
* If `mode` is a string, it is parsed as an octal integer.
|
|
1306
1323
|
* If `flag` is not supplied, the default of `'w'` is used.
|
|
1307
1324
|
*/
|
|
1308
|
-
function writeFile(path: PathLike | number, data: any, options: WriteFileOptions, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
1325
|
+
function writeFile(path: PathLike | number, data: any, options: WriteFileOptions, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
1309
1326
|
|
|
1310
1327
|
/**
|
|
1311
1328
|
* Asynchronously writes data to a file, replacing the file if it already exists.
|
|
@@ -1314,7 +1331,7 @@ declare module "fs" {
|
|
|
1314
1331
|
* If a file descriptor is provided, the underlying file will _not_ be closed automatically.
|
|
1315
1332
|
* @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string.
|
|
1316
1333
|
*/
|
|
1317
|
-
function writeFile(path: PathLike | number, data: any, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
1334
|
+
function writeFile(path: PathLike | number, data: any, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
1318
1335
|
|
|
1319
1336
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
1320
1337
|
namespace writeFile {
|
|
@@ -1359,7 +1376,7 @@ declare module "fs" {
|
|
|
1359
1376
|
* If `mode` is a string, it is parsed as an octal integer.
|
|
1360
1377
|
* If `flag` is not supplied, the default of `'a'` is used.
|
|
1361
1378
|
*/
|
|
1362
|
-
function appendFile(file: PathLike | number, data: any, options: WriteFileOptions, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
1379
|
+
function appendFile(file: PathLike | number, data: any, options: WriteFileOptions, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
1363
1380
|
|
|
1364
1381
|
/**
|
|
1365
1382
|
* Asynchronously append data to a file, creating the file if it does not exist.
|
|
@@ -1368,7 +1385,7 @@ declare module "fs" {
|
|
|
1368
1385
|
* If a file descriptor is provided, the underlying file will _not_ be closed automatically.
|
|
1369
1386
|
* @param data The data to write. If something other than a Buffer or Uint8Array is provided, the value is coerced to a string.
|
|
1370
1387
|
*/
|
|
1371
|
-
function appendFile(file: PathLike | number, data: any, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
1388
|
+
function appendFile(file: PathLike | number, data: any, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
1372
1389
|
|
|
1373
1390
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
1374
1391
|
namespace appendFile {
|
|
@@ -1653,14 +1670,14 @@ declare module "fs" {
|
|
|
1653
1670
|
* @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
|
|
1654
1671
|
* URL support is _experimental_.
|
|
1655
1672
|
*/
|
|
1656
|
-
function access(path: PathLike, mode: number | undefined, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
1673
|
+
function access(path: PathLike, mode: number | undefined, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
1657
1674
|
|
|
1658
1675
|
/**
|
|
1659
1676
|
* Asynchronously tests a user's permissions for the file specified by path.
|
|
1660
1677
|
* @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
|
|
1661
1678
|
* URL support is _experimental_.
|
|
1662
1679
|
*/
|
|
1663
|
-
function access(path: PathLike, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
1680
|
+
function access(path: PathLike, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
1664
1681
|
|
|
1665
1682
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
1666
1683
|
namespace access {
|
|
@@ -1713,7 +1730,7 @@ declare module "fs" {
|
|
|
1713
1730
|
* Asynchronous fdatasync(2) - synchronize a file's in-core state with storage device.
|
|
1714
1731
|
* @param fd A file descriptor.
|
|
1715
1732
|
*/
|
|
1716
|
-
function fdatasync(fd: number, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
1733
|
+
function fdatasync(fd: number, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
1717
1734
|
|
|
1718
1735
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
1719
1736
|
namespace fdatasync {
|
|
@@ -1739,7 +1756,7 @@ declare module "fs" {
|
|
|
1739
1756
|
* @param src A path to the source file.
|
|
1740
1757
|
* @param dest A path to the destination file.
|
|
1741
1758
|
*/
|
|
1742
|
-
function copyFile(src: PathLike, dest: PathLike, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
1759
|
+
function copyFile(src: PathLike, dest: PathLike, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
1743
1760
|
/**
|
|
1744
1761
|
* Asynchronously copies src to dest. By default, dest is overwritten if it already exists.
|
|
1745
1762
|
* No arguments other than a possible exception are given to the callback function.
|
|
@@ -1750,7 +1767,7 @@ declare module "fs" {
|
|
|
1750
1767
|
* @param dest A path to the destination file.
|
|
1751
1768
|
* @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.
|
|
1752
1769
|
*/
|
|
1753
|
-
function copyFile(src: PathLike, dest: PathLike, flags: number, callback: (err: NodeJS.ErrnoException) => void): void;
|
|
1770
|
+
function copyFile(src: PathLike, dest: PathLike, flags: number, callback: (err: NodeJS.ErrnoException | null) => void): void;
|
|
1754
1771
|
|
|
1755
1772
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
1756
1773
|
namespace copyFile {
|
node/globals.d.ts
CHANGED
|
@@ -45,7 +45,7 @@ interface Console {
|
|
|
45
45
|
/**
|
|
46
46
|
* The `console.groupCollapsed()` function is an alias for {@link console.group()}.
|
|
47
47
|
*/
|
|
48
|
-
groupCollapsed(): void;
|
|
48
|
+
groupCollapsed(...label: any[]): void;
|
|
49
49
|
/**
|
|
50
50
|
* Decreases indentation of subsequent lines by two spaces.
|
|
51
51
|
*/
|
node/http.d.ts
CHANGED
node/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "11.13.
|
|
3
|
+
"version": "11.13.6",
|
|
4
4
|
"description": "TypeScript definitions for Node.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"contributors": [
|
|
@@ -206,6 +206,6 @@
|
|
|
206
206
|
},
|
|
207
207
|
"scripts": {},
|
|
208
208
|
"dependencies": {},
|
|
209
|
-
"typesPublisherContentHash": "
|
|
209
|
+
"typesPublisherContentHash": "68b700b5c16f186af2cdc9f71c18f5be9bd4194b6eee50f1256f2894f6fe9884",
|
|
210
210
|
"typeScriptVersion": "2.0"
|
|
211
211
|
}
|
node/stream.d.ts
CHANGED
|
@@ -246,19 +246,19 @@ declare module "stream" {
|
|
|
246
246
|
|
|
247
247
|
class PassThrough extends Transform { }
|
|
248
248
|
|
|
249
|
-
function finished(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, callback: (err?: NodeJS.ErrnoException) => void): () => void;
|
|
249
|
+
function finished(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream, callback: (err?: NodeJS.ErrnoException | null) => void): () => void;
|
|
250
250
|
namespace finished {
|
|
251
251
|
function __promisify__(stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream): Promise<void>;
|
|
252
252
|
}
|
|
253
253
|
|
|
254
|
-
function pipeline<T extends NodeJS.WritableStream>(stream1: NodeJS.ReadableStream, stream2: T, callback?: (err: NodeJS.ErrnoException) => void): T;
|
|
255
|
-
function pipeline<T extends NodeJS.WritableStream>(stream1: NodeJS.ReadableStream, stream2: NodeJS.ReadWriteStream, stream3: T, callback?: (err: NodeJS.ErrnoException) => void): T;
|
|
254
|
+
function pipeline<T extends NodeJS.WritableStream>(stream1: NodeJS.ReadableStream, stream2: T, callback?: (err: NodeJS.ErrnoException | null) => void): T;
|
|
255
|
+
function pipeline<T extends NodeJS.WritableStream>(stream1: NodeJS.ReadableStream, stream2: NodeJS.ReadWriteStream, stream3: T, callback?: (err: NodeJS.ErrnoException | null) => void): T;
|
|
256
256
|
function pipeline<T extends NodeJS.WritableStream>(
|
|
257
257
|
stream1: NodeJS.ReadableStream,
|
|
258
258
|
stream2: NodeJS.ReadWriteStream,
|
|
259
259
|
stream3: NodeJS.ReadWriteStream,
|
|
260
260
|
stream4: T,
|
|
261
|
-
callback?: (err: NodeJS.ErrnoException) => void,
|
|
261
|
+
callback?: (err: NodeJS.ErrnoException | null) => void,
|
|
262
262
|
): T;
|
|
263
263
|
function pipeline<T extends NodeJS.WritableStream>(
|
|
264
264
|
stream1: NodeJS.ReadableStream,
|
|
@@ -266,13 +266,13 @@ declare module "stream" {
|
|
|
266
266
|
stream3: NodeJS.ReadWriteStream,
|
|
267
267
|
stream4: NodeJS.ReadWriteStream,
|
|
268
268
|
stream5: T,
|
|
269
|
-
callback?: (err: NodeJS.ErrnoException) => void,
|
|
269
|
+
callback?: (err: NodeJS.ErrnoException | null) => void,
|
|
270
270
|
): T;
|
|
271
|
-
function pipeline(streams: Array<NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream>, callback?: (err: NodeJS.ErrnoException) => void): NodeJS.WritableStream;
|
|
271
|
+
function pipeline(streams: Array<NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream>, callback?: (err: NodeJS.ErrnoException | null) => void): NodeJS.WritableStream;
|
|
272
272
|
function pipeline(
|
|
273
273
|
stream1: NodeJS.ReadableStream,
|
|
274
274
|
stream2: NodeJS.ReadWriteStream | NodeJS.WritableStream,
|
|
275
|
-
...streams: Array<NodeJS.ReadWriteStream | NodeJS.WritableStream | ((err: NodeJS.ErrnoException) => void)>,
|
|
275
|
+
...streams: Array<NodeJS.ReadWriteStream | NodeJS.WritableStream | ((err: NodeJS.ErrnoException | null) => void)>,
|
|
276
276
|
): NodeJS.WritableStream;
|
|
277
277
|
namespace pipeline {
|
|
278
278
|
function __promisify__(stream1: NodeJS.ReadableStream, stream2: NodeJS.WritableStream): Promise<void>;
|
node/util.d.ts
CHANGED
|
@@ -71,44 +71,44 @@ declare module "util" {
|
|
|
71
71
|
function callbackify<T1>(fn: (arg1: T1) => Promise<void>): (arg1: T1, callback: (err: NodeJS.ErrnoException) => void) => void;
|
|
72
72
|
function callbackify<T1, TResult>(fn: (arg1: T1) => Promise<TResult>): (arg1: T1, callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void;
|
|
73
73
|
function callbackify<T1, T2>(fn: (arg1: T1, arg2: T2) => Promise<void>): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException) => void) => void;
|
|
74
|
-
function callbackify<T1, T2, TResult>(fn: (arg1: T1, arg2: T2) => Promise<TResult>): (arg1: T1, arg2: T2, callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void;
|
|
74
|
+
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;
|
|
75
75
|
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;
|
|
76
76
|
function callbackify<T1, T2, T3, TResult>(
|
|
77
|
-
fn: (arg1: T1, arg2: T2, arg3: T3) => Promise<TResult>): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void;
|
|
77
|
+
fn: (arg1: T1, arg2: T2, arg3: T3) => Promise<TResult>): (arg1: T1, arg2: T2, arg3: T3, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
|
|
78
78
|
function callbackify<T1, T2, T3, T4>(
|
|
79
79
|
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;
|
|
80
80
|
function callbackify<T1, T2, T3, T4, TResult>(
|
|
81
|
-
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;
|
|
81
|
+
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;
|
|
82
82
|
function callbackify<T1, T2, T3, T4, T5>(
|
|
83
83
|
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;
|
|
84
84
|
function callbackify<T1, T2, T3, T4, T5, TResult>(
|
|
85
85
|
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<TResult>,
|
|
86
|
-
): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void;
|
|
86
|
+
): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
|
|
87
87
|
function callbackify<T1, T2, T3, T4, T5, T6>(
|
|
88
88
|
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise<void>,
|
|
89
89
|
): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6, callback: (err: NodeJS.ErrnoException) => void) => void;
|
|
90
90
|
function callbackify<T1, T2, T3, T4, T5, T6, TResult>(
|
|
91
91
|
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6) => Promise<TResult>
|
|
92
|
-
): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6, callback: (err: NodeJS.ErrnoException, result: TResult) => void) => void;
|
|
92
|
+
): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, arg6: T6, callback: (err: NodeJS.ErrnoException | null, result: TResult) => void) => void;
|
|
93
93
|
|
|
94
94
|
function promisify<TCustom extends Function>(fn: CustomPromisify<TCustom>): TCustom;
|
|
95
95
|
function promisify<TResult>(fn: (callback: (err: Error | null, result: TResult) => void) => void): () => Promise<TResult>;
|
|
96
|
-
function promisify(fn: (callback: (err?: Error
|
|
96
|
+
function promisify(fn: (callback: (err?: Error) => void) => void): () => Promise<void>;
|
|
97
97
|
function promisify<T1, TResult>(fn: (arg1: T1, callback: (err: Error | null, result: TResult) => void) => void): (arg1: T1) => Promise<TResult>;
|
|
98
|
-
function promisify<T1>(fn: (arg1: T1, callback: (err?: Error
|
|
98
|
+
function promisify<T1>(fn: (arg1: T1, callback: (err?: Error) => void) => void): (arg1: T1) => Promise<void>;
|
|
99
99
|
function promisify<T1, T2, TResult>(fn: (arg1: T1, arg2: T2, callback: (err: Error | null, result: TResult) => void) => void): (arg1: T1, arg2: T2) => Promise<TResult>;
|
|
100
|
-
function promisify<T1, T2>(fn: (arg1: T1, arg2: T2, callback: (err?: Error
|
|
100
|
+
function promisify<T1, T2>(fn: (arg1: T1, arg2: T2, callback: (err?: Error) => void) => void): (arg1: T1, arg2: T2) => Promise<void>;
|
|
101
101
|
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>;
|
|
102
|
-
function promisify<T1, T2, T3>(fn: (arg1: T1, arg2: T2, arg3: T3, callback: (err?: Error
|
|
102
|
+
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>;
|
|
103
103
|
function promisify<T1, T2, T3, T4, TResult>(
|
|
104
104
|
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err: Error | null, result: TResult) => void) => void,
|
|
105
105
|
): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => Promise<TResult>;
|
|
106
|
-
function promisify<T1, T2, T3, T4>(fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, callback: (err?: Error
|
|
106
|
+
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>;
|
|
107
107
|
function promisify<T1, T2, T3, T4, T5, TResult>(
|
|
108
108
|
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err: Error | null, result: TResult) => void) => void,
|
|
109
109
|
): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<TResult>;
|
|
110
110
|
function promisify<T1, T2, T3, T4, T5>(
|
|
111
|
-
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err?: Error
|
|
111
|
+
fn: (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5, callback: (err?: Error) => void) => void,
|
|
112
112
|
): (arg1: T1, arg2: T2, arg3: T3, arg4: T4, arg5: T5) => Promise<void>;
|
|
113
113
|
function promisify(fn: Function): Function;
|
|
114
114
|
|