@types/node 10.0.7 → 10.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- node/README.md +2 -2
- node/index.d.ts +471 -421
- node/package.json +7 -2
node/README.md
CHANGED
|
@@ -8,9 +8,9 @@ This package contains type definitions for Node.js (http://nodejs.org/).
|
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped.git/tree/master/types/node
|
|
9
9
|
|
|
10
10
|
Additional Details
|
|
11
|
-
* Last updated:
|
|
11
|
+
* Last updated: Tue, 15 May 2018 21:28:51 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 <http://typescriptlang.org>, DefinitelyTyped <https://github.com/DefinitelyTyped/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>, Klaus Meinhardt <https://github.com/ajafff>, Huw <https://github.com/hoo29>, Nicolas Even <https://github.com/n-e>, Bruno Scheufler <https://github.com/brunoscheufler>, Mohsen Azimi <https://github.com/mohsen1>, Hoàng Văn Khải <https://github.com/KSXGitHub>, Alexander T. <https://github.com/a-tarasyuk>.
|
|
16
|
+
These definitions were written by Microsoft TypeScript <http://typescriptlang.org>, DefinitelyTyped <https://github.com/DefinitelyTyped/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>, Klaus Meinhardt <https://github.com/ajafff>, Huw <https://github.com/hoo29>, Nicolas Even <https://github.com/n-e>, Bruno Scheufler <https://github.com/brunoscheufler>, Mohsen Azimi <https://github.com/mohsen1>, Hoàng Văn Khải <https://github.com/KSXGitHub>, Alexander T. <https://github.com/a-tarasyuk>, Lishude <https://github.com/islishude>.
|
node/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Type definitions for Node.js 10.
|
|
1
|
+
// Type definitions for Node.js 10.1.x
|
|
2
2
|
// Project: http://nodejs.org/
|
|
3
3
|
// Definitions by: Microsoft TypeScript <http://typescriptlang.org>
|
|
4
4
|
// DefinitelyTyped <https://github.com/DefinitelyTyped/DefinitelyTyped>
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
// Mohsen Azimi <https://github.com/mohsen1>
|
|
24
24
|
// Hoàng Văn Khải <https://github.com/KSXGitHub>
|
|
25
25
|
// Alexander T. <https://github.com/a-tarasyuk>
|
|
26
|
+
// Lishude <https://github.com/islishude>
|
|
26
27
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
27
28
|
|
|
28
29
|
/** inspector module types */
|
|
@@ -560,6 +561,7 @@ declare namespace NodeJS {
|
|
|
560
561
|
on(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
561
562
|
once(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
562
563
|
removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
564
|
+
off(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
563
565
|
removeAllListeners(event?: string | symbol): this;
|
|
564
566
|
setMaxListeners(n: number): this;
|
|
565
567
|
getMaxListeners(): number;
|
|
@@ -1003,7 +1005,8 @@ declare module "events" {
|
|
|
1003
1005
|
|
|
1004
1006
|
namespace internal {
|
|
1005
1007
|
export class EventEmitter extends internal {
|
|
1006
|
-
|
|
1008
|
+
/** @deprecated since v4.0.0 */
|
|
1009
|
+
static listenerCount(emitter: EventEmitter, event: string | symbol): number;
|
|
1007
1010
|
static defaultMaxListeners: number;
|
|
1008
1011
|
|
|
1009
1012
|
addListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
@@ -1012,6 +1015,7 @@ declare module "events" {
|
|
|
1012
1015
|
prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
1013
1016
|
prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
1014
1017
|
removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
1018
|
+
off(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
1015
1019
|
removeAllListeners(event?: string | symbol): this;
|
|
1016
1020
|
setMaxListeners(n: number): this;
|
|
1017
1021
|
getMaxListeners(): number;
|
|
@@ -2253,33 +2257,33 @@ declare module "child_process" {
|
|
|
2253
2257
|
|
|
2254
2258
|
export function execFile(file: string): ChildProcess;
|
|
2255
2259
|
export function execFile(file: string, options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null): ChildProcess;
|
|
2256
|
-
export function execFile(file: string, args
|
|
2257
|
-
export function execFile(file: string, args: string
|
|
2260
|
+
export function execFile(file: string, args?: ReadonlyArray<string> | null): ChildProcess;
|
|
2261
|
+
export function execFile(file: string, args: ReadonlyArray<string> | undefined | null, options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null): ChildProcess;
|
|
2258
2262
|
|
|
2259
2263
|
// no `options` definitely means stdout/stderr are `string`.
|
|
2260
2264
|
export function execFile(file: string, callback: (error: Error | null, stdout: string, stderr: string) => void): ChildProcess;
|
|
2261
|
-
export function execFile(file: string, args: string
|
|
2265
|
+
export function execFile(file: string, args: ReadonlyArray<string> | undefined | null, callback: (error: Error | null, stdout: string, stderr: string) => void): ChildProcess;
|
|
2262
2266
|
|
|
2263
2267
|
// `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`.
|
|
2264
2268
|
export function execFile(file: string, options: ExecFileOptionsWithBufferEncoding, callback: (error: Error | null, stdout: Buffer, stderr: Buffer) => void): ChildProcess;
|
|
2265
|
-
export function execFile(file: string, args: string
|
|
2269
|
+
export function execFile(file: string, args: ReadonlyArray<string> | undefined | null, options: ExecFileOptionsWithBufferEncoding, callback: (error: Error | null, stdout: Buffer, stderr: Buffer) => void): ChildProcess;
|
|
2266
2270
|
|
|
2267
2271
|
// `options` with well known `encoding` means stdout/stderr are definitely `string`.
|
|
2268
2272
|
export function execFile(file: string, options: ExecFileOptionsWithStringEncoding, callback: (error: Error | null, stdout: string, stderr: string) => void): ChildProcess;
|
|
2269
|
-
export function execFile(file: string, args: string
|
|
2273
|
+
export function execFile(file: string, args: ReadonlyArray<string> | undefined | null, options: ExecFileOptionsWithStringEncoding, callback: (error: Error | null, stdout: string, stderr: string) => void): ChildProcess;
|
|
2270
2274
|
|
|
2271
2275
|
// `options` with an `encoding` whose type is `string` means stdout/stderr could either be `Buffer` or `string`.
|
|
2272
2276
|
// There is no guarantee the `encoding` is unknown as `string` is a superset of `BufferEncoding`.
|
|
2273
2277
|
export function execFile(file: string, options: ExecFileOptionsWithOtherEncoding, callback: (error: Error | null, stdout: string | Buffer, stderr: string | Buffer) => void): ChildProcess;
|
|
2274
|
-
export function execFile(file: string, args: string
|
|
2278
|
+
export function execFile(file: string, args: ReadonlyArray<string> | undefined | null, options: ExecFileOptionsWithOtherEncoding, callback: (error: Error | null, stdout: string | Buffer, stderr: string | Buffer) => void): ChildProcess;
|
|
2275
2279
|
|
|
2276
2280
|
// `options` without an `encoding` means stdout/stderr are definitely `string`.
|
|
2277
2281
|
export function execFile(file: string, options: ExecFileOptions, callback: (error: Error | null, stdout: string, stderr: string) => void): ChildProcess;
|
|
2278
|
-
export function execFile(file: string, args: string
|
|
2282
|
+
export function execFile(file: string, args: ReadonlyArray<string> | undefined | null, options: ExecFileOptions, callback: (error: Error | null, stdout: string, stderr: string) => void): ChildProcess;
|
|
2279
2283
|
|
|
2280
2284
|
// fallback if nothing else matches. Worst case is always `string | Buffer`.
|
|
2281
2285
|
export function execFile(file: string, options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null, callback: ((error: Error | null, stdout: string | Buffer, stderr: string | Buffer) => void) | undefined | null): ChildProcess;
|
|
2282
|
-
export function execFile(file: string, args: string
|
|
2286
|
+
export function execFile(file: string, args: ReadonlyArray<string> | undefined | null, options: ({ encoding?: string | null } & ExecFileOptions) | undefined | null, callback: ((error: Error | null, stdout: string | Buffer, stderr: string | Buffer) => void) | undefined | null): ChildProcess;
|
|
2283
2287
|
|
|
2284
2288
|
// NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime.
|
|
2285
2289
|
export namespace execFile {
|
|
@@ -2308,7 +2312,7 @@ declare module "child_process" {
|
|
|
2308
2312
|
gid?: number;
|
|
2309
2313
|
windowsVerbatimArguments?: boolean;
|
|
2310
2314
|
}
|
|
2311
|
-
export function fork(modulePath: string, args?: string
|
|
2315
|
+
export function fork(modulePath: string, args?: ReadonlyArray<string>, options?: ForkOptions): ChildProcess;
|
|
2312
2316
|
|
|
2313
2317
|
export interface SpawnSyncOptions {
|
|
2314
2318
|
cwd?: string;
|
|
@@ -2344,9 +2348,9 @@ declare module "child_process" {
|
|
|
2344
2348
|
export function spawnSync(command: string, options?: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns<string>;
|
|
2345
2349
|
export function spawnSync(command: string, options?: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns<Buffer>;
|
|
2346
2350
|
export function spawnSync(command: string, options?: SpawnSyncOptions): SpawnSyncReturns<Buffer>;
|
|
2347
|
-
export function spawnSync(command: string, args?: string
|
|
2348
|
-
export function spawnSync(command: string, args?: string
|
|
2349
|
-
export function spawnSync(command: string, args?: string
|
|
2351
|
+
export function spawnSync(command: string, args?: ReadonlyArray<string>, options?: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns<string>;
|
|
2352
|
+
export function spawnSync(command: string, args?: ReadonlyArray<string>, options?: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns<Buffer>;
|
|
2353
|
+
export function spawnSync(command: string, args?: ReadonlyArray<string>, options?: SpawnSyncOptions): SpawnSyncReturns<Buffer>;
|
|
2350
2354
|
|
|
2351
2355
|
export interface ExecSyncOptions {
|
|
2352
2356
|
cwd?: string;
|
|
@@ -2396,9 +2400,9 @@ declare module "child_process" {
|
|
|
2396
2400
|
export function execFileSync(command: string, options?: ExecFileSyncOptionsWithStringEncoding): string;
|
|
2397
2401
|
export function execFileSync(command: string, options?: ExecFileSyncOptionsWithBufferEncoding): Buffer;
|
|
2398
2402
|
export function execFileSync(command: string, options?: ExecFileSyncOptions): Buffer;
|
|
2399
|
-
export function execFileSync(command: string, args?: string
|
|
2400
|
-
export function execFileSync(command: string, args?: string
|
|
2401
|
-
export function execFileSync(command: string, args?: string
|
|
2403
|
+
export function execFileSync(command: string, args?: ReadonlyArray<string>, options?: ExecFileSyncOptionsWithStringEncoding): string;
|
|
2404
|
+
export function execFileSync(command: string, args?: ReadonlyArray<string>, options?: ExecFileSyncOptionsWithBufferEncoding): Buffer;
|
|
2405
|
+
export function execFileSync(command: string, args?: ReadonlyArray<string>, options?: ExecFileSyncOptions): Buffer;
|
|
2402
2406
|
}
|
|
2403
2407
|
|
|
2404
2408
|
declare module "url" {
|
|
@@ -2940,8 +2944,8 @@ declare module "dgram" {
|
|
|
2940
2944
|
export function createSocket(options: SocketOptions, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket;
|
|
2941
2945
|
|
|
2942
2946
|
export class Socket extends events.EventEmitter {
|
|
2943
|
-
send(msg: Buffer |
|
|
2944
|
-
send(msg: Buffer |
|
|
2947
|
+
send(msg: Buffer | string | Uint8Array | any[], port: number, address?: string, callback?: (error: Error | null, bytes: number) => void): void;
|
|
2948
|
+
send(msg: Buffer | string | Uint8Array, offset: number, length: number, port: number, address?: string, callback?: (error: Error | null, bytes: number) => void): void;
|
|
2945
2949
|
bind(port?: number, address?: string, callback?: () => void): void;
|
|
2946
2950
|
bind(port?: number, callback?: () => void): void;
|
|
2947
2951
|
bind(callback?: () => void): void;
|
|
@@ -4659,482 +4663,481 @@ declare module "fs" {
|
|
|
4659
4663
|
* @param flags An optional 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.
|
|
4660
4664
|
*/
|
|
4661
4665
|
export function copyFileSync(src: PathLike, dest: PathLike, flags?: number): void;
|
|
4662
|
-
}
|
|
4663
4666
|
|
|
4664
|
-
|
|
4665
|
-
|
|
4666
|
-
|
|
4667
|
-
|
|
4668
|
-
|
|
4669
|
-
|
|
4670
|
-
readonly fd: number;
|
|
4667
|
+
export namespace promises {
|
|
4668
|
+
interface FileHandle {
|
|
4669
|
+
/**
|
|
4670
|
+
* Gets the file descriptor for this file handle.
|
|
4671
|
+
*/
|
|
4672
|
+
readonly fd: number;
|
|
4671
4673
|
|
|
4672
|
-
|
|
4673
|
-
|
|
4674
|
-
|
|
4675
|
-
|
|
4676
|
-
|
|
4677
|
-
|
|
4678
|
-
|
|
4679
|
-
|
|
4680
|
-
|
|
4681
|
-
|
|
4682
|
-
|
|
4674
|
+
/**
|
|
4675
|
+
* Asynchronously append data to a file, creating the file if it does not exist. The underlying file will _not_ be closed automatically.
|
|
4676
|
+
* The `FileHandle` must have been opened for appending.
|
|
4677
|
+
* @param data The data to write. If something other than a `Buffer` or `Uint8Array` is provided, the value is coerced to a string.
|
|
4678
|
+
* @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag.
|
|
4679
|
+
* If `encoding` is not supplied, the default of `'utf8'` is used.
|
|
4680
|
+
* If `mode` is not supplied, the default of `0o666` is used.
|
|
4681
|
+
* If `mode` is a string, it is parsed as an octal integer.
|
|
4682
|
+
* If `flag` is not supplied, the default of `'a'` is used.
|
|
4683
|
+
*/
|
|
4684
|
+
appendFile(data: any, options?: { encoding?: string | null, mode?: string | number, flag?: string | number } | string | null): Promise<void>;
|
|
4683
4685
|
|
|
4684
|
-
|
|
4685
|
-
|
|
4686
|
-
|
|
4687
|
-
|
|
4686
|
+
/**
|
|
4687
|
+
* Asynchronous fchown(2) - Change ownership of a file.
|
|
4688
|
+
*/
|
|
4689
|
+
chown(uid: number, gid: number): Promise<void>;
|
|
4690
|
+
|
|
4691
|
+
/**
|
|
4692
|
+
* Asynchronous fchmod(2) - Change permissions of a file.
|
|
4693
|
+
* @param mode A file mode. If a string is passed, it is parsed as an octal integer.
|
|
4694
|
+
*/
|
|
4695
|
+
chmod(mode: string | number): Promise<void>;
|
|
4696
|
+
|
|
4697
|
+
/**
|
|
4698
|
+
* Asynchronous fdatasync(2) - synchronize a file's in-core state with storage device.
|
|
4699
|
+
*/
|
|
4700
|
+
datasync(): Promise<void>;
|
|
4701
|
+
|
|
4702
|
+
/**
|
|
4703
|
+
* Asynchronous fsync(2) - synchronize a file's in-core state with the underlying storage device.
|
|
4704
|
+
*/
|
|
4705
|
+
sync(): Promise<void>;
|
|
4706
|
+
|
|
4707
|
+
/**
|
|
4708
|
+
* Asynchronously reads data from the file.
|
|
4709
|
+
* The `FileHandle` must have been opened for reading.
|
|
4710
|
+
* @param buffer The buffer that the data will be written to.
|
|
4711
|
+
* @param offset The offset in the buffer at which to start writing.
|
|
4712
|
+
* @param length The number of bytes to read.
|
|
4713
|
+
* @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.
|
|
4714
|
+
*/
|
|
4715
|
+
read<TBuffer extends Buffer | Uint8Array>(buffer: TBuffer, offset?: number | null, length?: number | null, position?: number | null): Promise<{ bytesRead: number, buffer: TBuffer }>;
|
|
4716
|
+
|
|
4717
|
+
/**
|
|
4718
|
+
* Asynchronously reads the entire contents of a file. The underlying file will _not_ be closed automatically.
|
|
4719
|
+
* The `FileHandle` must have been opened for reading.
|
|
4720
|
+
* @param options An object that may contain an optional flag.
|
|
4721
|
+
* If a flag is not provided, it defaults to `'r'`.
|
|
4722
|
+
*/
|
|
4723
|
+
readFile(options?: { encoding?: null, flag?: string | number } | null): Promise<Buffer>;
|
|
4724
|
+
|
|
4725
|
+
/**
|
|
4726
|
+
* Asynchronously reads the entire contents of a file. The underlying file will _not_ be closed automatically.
|
|
4727
|
+
* The `FileHandle` must have been opened for reading.
|
|
4728
|
+
* @param options An object that may contain an optional flag.
|
|
4729
|
+
* If a flag is not provided, it defaults to `'r'`.
|
|
4730
|
+
*/
|
|
4731
|
+
readFile(options: { encoding: BufferEncoding, flag?: string | number } | BufferEncoding): Promise<string>;
|
|
4732
|
+
|
|
4733
|
+
/**
|
|
4734
|
+
* Asynchronously reads the entire contents of a file. The underlying file will _not_ be closed automatically.
|
|
4735
|
+
* The `FileHandle` must have been opened for reading.
|
|
4736
|
+
* @param options An object that may contain an optional flag.
|
|
4737
|
+
* If a flag is not provided, it defaults to `'r'`.
|
|
4738
|
+
*/
|
|
4739
|
+
readFile(options?: { encoding?: string | null, flag?: string | number } | string | null): Promise<string | Buffer>;
|
|
4740
|
+
|
|
4741
|
+
/**
|
|
4742
|
+
* Asynchronous fstat(2) - Get file status.
|
|
4743
|
+
*/
|
|
4744
|
+
stat(): Promise<Stats>;
|
|
4745
|
+
|
|
4746
|
+
/**
|
|
4747
|
+
* Asynchronous ftruncate(2) - Truncate a file to a specified length.
|
|
4748
|
+
* @param len If not specified, defaults to `0`.
|
|
4749
|
+
*/
|
|
4750
|
+
truncate(len?: number): Promise<void>;
|
|
4751
|
+
|
|
4752
|
+
/**
|
|
4753
|
+
* Asynchronously change file timestamps of the file.
|
|
4754
|
+
* @param atime The last access time. If a string is provided, it will be coerced to number.
|
|
4755
|
+
* @param mtime The last modified time. If a string is provided, it will be coerced to number.
|
|
4756
|
+
*/
|
|
4757
|
+
utimes(atime: string | number | Date, mtime: string | number | Date): Promise<void>;
|
|
4758
|
+
|
|
4759
|
+
/**
|
|
4760
|
+
* Asynchronously writes `buffer` to the file.
|
|
4761
|
+
* The `FileHandle` must have been opened for writing.
|
|
4762
|
+
* @param buffer The buffer that the data will be written to.
|
|
4763
|
+
* @param offset The part of the buffer to be written. If not supplied, defaults to `0`.
|
|
4764
|
+
* @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`.
|
|
4765
|
+
* @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
|
|
4766
|
+
*/
|
|
4767
|
+
write<TBuffer extends Buffer | Uint8Array>(buffer: TBuffer, offset?: number | null, length?: number | null, position?: number | null): Promise<{ bytesWritten: number, buffer: TBuffer }>;
|
|
4768
|
+
|
|
4769
|
+
/**
|
|
4770
|
+
* Asynchronously writes `string` to the file.
|
|
4771
|
+
* The `FileHandle` must have been opened for writing.
|
|
4772
|
+
* It is unsafe to call `write()` multiple times on the same file without waiting for the `Promise` to be resolved (or rejected). For this scenario, `fs.createWriteStream` is strongly recommended.
|
|
4773
|
+
* @param string A string to write. If something other than a string is supplied it will be coerced to a string.
|
|
4774
|
+
* @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
|
|
4775
|
+
* @param encoding The expected string encoding.
|
|
4776
|
+
*/
|
|
4777
|
+
write(data: any, position?: number | null, encoding?: string | null): Promise<{ bytesWritten: number, buffer: string }>;
|
|
4778
|
+
|
|
4779
|
+
/**
|
|
4780
|
+
* Asynchronously writes data to a file, replacing the file if it already exists. The underlying file will _not_ be closed automatically.
|
|
4781
|
+
* The `FileHandle` must have been opened for writing.
|
|
4782
|
+
* It is unsafe to call `writeFile()` multiple times on the same file without waiting for the `Promise` to be resolved (or rejected).
|
|
4783
|
+
* @param data The data to write. If something other than a `Buffer` or `Uint8Array` is provided, the value is coerced to a string.
|
|
4784
|
+
* @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag.
|
|
4785
|
+
* If `encoding` is not supplied, the default of `'utf8'` is used.
|
|
4786
|
+
* If `mode` is not supplied, the default of `0o666` is used.
|
|
4787
|
+
* If `mode` is a string, it is parsed as an octal integer.
|
|
4788
|
+
* If `flag` is not supplied, the default of `'w'` is used.
|
|
4789
|
+
*/
|
|
4790
|
+
writeFile(data: any, options?: { encoding?: string | null, mode?: string | number, flag?: string | number } | string | null): Promise<void>;
|
|
4791
|
+
|
|
4792
|
+
/**
|
|
4793
|
+
* Asynchronous close(2) - close a `FileHandle`.
|
|
4794
|
+
*/
|
|
4795
|
+
close(): Promise<void>;
|
|
4796
|
+
}
|
|
4688
4797
|
|
|
4689
4798
|
/**
|
|
4690
|
-
*
|
|
4691
|
-
* @param
|
|
4799
|
+
* Asynchronously tests a user's permissions for the file specified by path.
|
|
4800
|
+
* @param path A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
|
|
4801
|
+
* URL support is _experimental_.
|
|
4692
4802
|
*/
|
|
4693
|
-
|
|
4803
|
+
function access(path: PathLike, mode?: number): Promise<void>;
|
|
4694
4804
|
|
|
4695
4805
|
/**
|
|
4696
|
-
*
|
|
4806
|
+
* Asynchronously copies `src` to `dest`. By default, `dest` is overwritten if it already exists.
|
|
4807
|
+
* Node.js makes no guarantees about the atomicity of the copy operation.
|
|
4808
|
+
* If an error occurs after the destination file has been opened for writing, Node.js will attempt
|
|
4809
|
+
* to remove the destination.
|
|
4810
|
+
* @param src A path to the source file.
|
|
4811
|
+
* @param dest A path to the destination file.
|
|
4812
|
+
* @param flags An optional integer that specifies the behavior of the copy operation. The only
|
|
4813
|
+
* supported flag is `fs.constants.COPYFILE_EXCL`, which causes the copy operation to fail if
|
|
4814
|
+
* `dest` already exists.
|
|
4697
4815
|
*/
|
|
4698
|
-
|
|
4816
|
+
function copyFile(src: PathLike, dest: PathLike, flags?: number): Promise<void>;
|
|
4699
4817
|
|
|
4700
4818
|
/**
|
|
4701
|
-
* Asynchronous
|
|
4819
|
+
* Asynchronous open(2) - open and possibly create a file.
|
|
4820
|
+
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
4821
|
+
* @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not
|
|
4822
|
+
* supplied, defaults to `0o666`.
|
|
4702
4823
|
*/
|
|
4703
|
-
|
|
4824
|
+
function open(path: PathLike, flags: string | number, mode?: string | number): Promise<FileHandle>;
|
|
4704
4825
|
|
|
4705
4826
|
/**
|
|
4706
|
-
* Asynchronously reads data from the file
|
|
4707
|
-
*
|
|
4827
|
+
* Asynchronously reads data from the file referenced by the supplied `FileHandle`.
|
|
4828
|
+
* @param handle A `FileHandle`.
|
|
4708
4829
|
* @param buffer The buffer that the data will be written to.
|
|
4709
4830
|
* @param offset The offset in the buffer at which to start writing.
|
|
4710
4831
|
* @param length The number of bytes to read.
|
|
4711
|
-
* @param position The offset from the beginning of the file from which data should be read. If
|
|
4832
|
+
* @param position The offset from the beginning of the file from which data should be read. If
|
|
4833
|
+
* `null`, data will be read from the current position.
|
|
4712
4834
|
*/
|
|
4713
|
-
read<TBuffer extends Buffer | Uint8Array>(buffer: TBuffer, offset?: number | null, length?: number | null, position?: number | null): Promise<{ bytesRead: number, buffer: TBuffer }>;
|
|
4835
|
+
function read<TBuffer extends Buffer | Uint8Array>(handle: FileHandle, buffer: TBuffer, offset?: number | null, length?: number | null, position?: number | null): Promise<{ bytesRead: number, buffer: TBuffer }>;
|
|
4714
4836
|
|
|
4715
4837
|
/**
|
|
4716
|
-
* Asynchronously
|
|
4717
|
-
*
|
|
4718
|
-
* @param
|
|
4719
|
-
*
|
|
4838
|
+
* Asynchronously writes `buffer` to the file referenced by the supplied `FileHandle`.
|
|
4839
|
+
* It is unsafe to call `fsPromises.write()` multiple times on the same file without waiting for the `Promise` to be resolved (or rejected). For this scenario, `fs.createWriteStream` is strongly recommended.
|
|
4840
|
+
* @param handle A `FileHandle`.
|
|
4841
|
+
* @param buffer The buffer that the data will be written to.
|
|
4842
|
+
* @param offset The part of the buffer to be written. If not supplied, defaults to `0`.
|
|
4843
|
+
* @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`.
|
|
4844
|
+
* @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
|
|
4720
4845
|
*/
|
|
4721
|
-
|
|
4846
|
+
function write<TBuffer extends Buffer | Uint8Array>(handle: FileHandle, buffer: TBuffer, offset?: number | null, length?: number | null, position?: number | null): Promise<{ bytesWritten: number, buffer: TBuffer }>;
|
|
4722
4847
|
|
|
4723
4848
|
/**
|
|
4724
|
-
* Asynchronously
|
|
4725
|
-
*
|
|
4726
|
-
* @param
|
|
4727
|
-
* If a
|
|
4849
|
+
* Asynchronously writes `string` to the file referenced by the supplied `FileHandle`.
|
|
4850
|
+
* It is unsafe to call `fsPromises.write()` multiple times on the same file without waiting for the `Promise` to be resolved (or rejected). For this scenario, `fs.createWriteStream` is strongly recommended.
|
|
4851
|
+
* @param handle A `FileHandle`.
|
|
4852
|
+
* @param string A string to write. If something other than a string is supplied it will be coerced to a string.
|
|
4853
|
+
* @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
|
|
4854
|
+
* @param encoding The expected string encoding.
|
|
4728
4855
|
*/
|
|
4729
|
-
|
|
4856
|
+
function write(handle: FileHandle, string: any, position?: number | null, encoding?: string | null): Promise<{ bytesWritten: number, buffer: string }>;
|
|
4730
4857
|
|
|
4731
4858
|
/**
|
|
4732
|
-
*
|
|
4733
|
-
*
|
|
4734
|
-
*
|
|
4735
|
-
* If a
|
|
4859
|
+
* Asynchronous rename(2) - Change the name or location of a file or directory.
|
|
4860
|
+
* @param oldPath A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
4861
|
+
* URL support is _experimental_.
|
|
4862
|
+
* @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
4863
|
+
* URL support is _experimental_.
|
|
4736
4864
|
*/
|
|
4737
|
-
|
|
4865
|
+
function rename(oldPath: PathLike, newPath: PathLike): Promise<void>;
|
|
4738
4866
|
|
|
4739
4867
|
/**
|
|
4740
|
-
* Asynchronous
|
|
4868
|
+
* Asynchronous truncate(2) - Truncate a file to a specified length.
|
|
4869
|
+
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
4870
|
+
* @param len If not specified, defaults to `0`.
|
|
4741
4871
|
*/
|
|
4742
|
-
|
|
4872
|
+
function truncate(path: PathLike, len?: number): Promise<void>;
|
|
4743
4873
|
|
|
4744
4874
|
/**
|
|
4745
4875
|
* Asynchronous ftruncate(2) - Truncate a file to a specified length.
|
|
4876
|
+
* @param handle A `FileHandle`.
|
|
4746
4877
|
* @param len If not specified, defaults to `0`.
|
|
4747
4878
|
*/
|
|
4748
|
-
|
|
4879
|
+
function ftruncate(handle: FileHandle, len?: number): Promise<void>;
|
|
4749
4880
|
|
|
4750
4881
|
/**
|
|
4751
|
-
*
|
|
4752
|
-
* @param
|
|
4753
|
-
* @param mtime The last modified time. If a string is provided, it will be coerced to number.
|
|
4882
|
+
* Asynchronous rmdir(2) - delete a directory.
|
|
4883
|
+
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
4754
4884
|
*/
|
|
4755
|
-
|
|
4885
|
+
function rmdir(path: PathLike): Promise<void>;
|
|
4756
4886
|
|
|
4757
4887
|
/**
|
|
4758
|
-
*
|
|
4759
|
-
*
|
|
4760
|
-
* @param buffer The buffer that the data will be written to.
|
|
4761
|
-
* @param offset The part of the buffer to be written. If not supplied, defaults to `0`.
|
|
4762
|
-
* @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`.
|
|
4763
|
-
* @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
|
|
4888
|
+
* Asynchronous fdatasync(2) - synchronize a file's in-core state with storage device.
|
|
4889
|
+
* @param handle A `FileHandle`.
|
|
4764
4890
|
*/
|
|
4765
|
-
|
|
4891
|
+
function fdatasync(handle: FileHandle): Promise<void>;
|
|
4766
4892
|
|
|
4767
4893
|
/**
|
|
4768
|
-
*
|
|
4769
|
-
*
|
|
4770
|
-
* It is unsafe to call `write()` multiple times on the same file without waiting for the `Promise` to be resolved (or rejected). For this scenario, `fs.createWriteStream` is strongly recommended.
|
|
4771
|
-
* @param string A string to write. If something other than a string is supplied it will be coerced to a string.
|
|
4772
|
-
* @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
|
|
4773
|
-
* @param encoding The expected string encoding.
|
|
4894
|
+
* Asynchronous fsync(2) - synchronize a file's in-core state with the underlying storage device.
|
|
4895
|
+
* @param handle A `FileHandle`.
|
|
4774
4896
|
*/
|
|
4775
|
-
|
|
4897
|
+
function fsync(handle: FileHandle): Promise<void>;
|
|
4776
4898
|
|
|
4777
4899
|
/**
|
|
4778
|
-
*
|
|
4779
|
-
*
|
|
4780
|
-
*
|
|
4781
|
-
* @param data The data to write. If something other than a `Buffer` or `Uint8Array` is provided, the value is coerced to a string.
|
|
4782
|
-
* @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag.
|
|
4783
|
-
* If `encoding` is not supplied, the default of `'utf8'` is used.
|
|
4784
|
-
* If `mode` is not supplied, the default of `0o666` is used.
|
|
4785
|
-
* If `mode` is a string, it is parsed as an octal integer.
|
|
4786
|
-
* If `flag` is not supplied, the default of `'w'` is used.
|
|
4900
|
+
* Asynchronous mkdir(2) - create a directory.
|
|
4901
|
+
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
4902
|
+
* @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
|
|
4787
4903
|
*/
|
|
4788
|
-
|
|
4904
|
+
function mkdir(path: PathLike, mode?: string | number): Promise<void>;
|
|
4789
4905
|
|
|
4790
4906
|
/**
|
|
4791
|
-
* Asynchronous
|
|
4907
|
+
* Asynchronous readdir(3) - read a directory.
|
|
4908
|
+
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
4909
|
+
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
4792
4910
|
*/
|
|
4793
|
-
|
|
4794
|
-
}
|
|
4911
|
+
function readdir(path: PathLike, options?: { encoding?: BufferEncoding | null } | BufferEncoding | null): Promise<string[]>;
|
|
4795
4912
|
|
|
4796
|
-
|
|
4797
|
-
|
|
4798
|
-
|
|
4799
|
-
|
|
4800
|
-
|
|
4801
|
-
|
|
4802
|
-
|
|
4803
|
-
/**
|
|
4804
|
-
* Asynchronously copies `src` to `dest`. By default, `dest` is overwritten if it already exists.
|
|
4805
|
-
* Node.js makes no guarantees about the atomicity of the copy operation.
|
|
4806
|
-
* If an error occurs after the destination file has been opened for writing, Node.js will attempt
|
|
4807
|
-
* to remove the destination.
|
|
4808
|
-
* @param src A path to the source file.
|
|
4809
|
-
* @param dest A path to the destination file.
|
|
4810
|
-
* @param flags An optional integer that specifies the behavior of the copy operation. The only
|
|
4811
|
-
* supported flag is `fs.constants.COPYFILE_EXCL`, which causes the copy operation to fail if
|
|
4812
|
-
* `dest` already exists.
|
|
4813
|
-
*/
|
|
4814
|
-
function copyFile(src: PathLike, dest: PathLike, flags?: number): Promise<void>;
|
|
4815
|
-
|
|
4816
|
-
/**
|
|
4817
|
-
* Asynchronous open(2) - open and possibly create a file.
|
|
4818
|
-
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
4819
|
-
* @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not
|
|
4820
|
-
* supplied, defaults to `0o666`.
|
|
4821
|
-
*/
|
|
4822
|
-
function open(path: PathLike, flags: string | number, mode?: string | number): Promise<FileHandle>;
|
|
4823
|
-
|
|
4824
|
-
/**
|
|
4825
|
-
* Asynchronously reads data from the file referenced by the supplied `FileHandle`.
|
|
4826
|
-
* @param handle A `FileHandle`.
|
|
4827
|
-
* @param buffer The buffer that the data will be written to.
|
|
4828
|
-
* @param offset The offset in the buffer at which to start writing.
|
|
4829
|
-
* @param length The number of bytes to read.
|
|
4830
|
-
* @param position The offset from the beginning of the file from which data should be read. If
|
|
4831
|
-
* `null`, data will be read from the current position.
|
|
4832
|
-
*/
|
|
4833
|
-
function read<TBuffer extends Buffer | Uint8Array>(handle: FileHandle, buffer: TBuffer, offset?: number | null, length?: number | null, position?: number | null): Promise<{ bytesRead: number, buffer: TBuffer }>;
|
|
4834
|
-
|
|
4835
|
-
/**
|
|
4836
|
-
* Asynchronously writes `buffer` to the file referenced by the supplied `FileHandle`.
|
|
4837
|
-
* It is unsafe to call `fsPromises.write()` multiple times on the same file without waiting for the `Promise` to be resolved (or rejected). For this scenario, `fs.createWriteStream` is strongly recommended.
|
|
4838
|
-
* @param handle A `FileHandle`.
|
|
4839
|
-
* @param buffer The buffer that the data will be written to.
|
|
4840
|
-
* @param offset The part of the buffer to be written. If not supplied, defaults to `0`.
|
|
4841
|
-
* @param length The number of bytes to write. If not supplied, defaults to `buffer.length - offset`.
|
|
4842
|
-
* @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
|
|
4843
|
-
*/
|
|
4844
|
-
function write<TBuffer extends Buffer | Uint8Array>(handle: FileHandle, buffer: TBuffer, offset?: number | null, length?: number | null, position?: number | null): Promise<{ bytesWritten: number, buffer: TBuffer }>;
|
|
4845
|
-
|
|
4846
|
-
/**
|
|
4847
|
-
* Asynchronously writes `string` to the file referenced by the supplied `FileHandle`.
|
|
4848
|
-
* It is unsafe to call `fsPromises.write()` multiple times on the same file without waiting for the `Promise` to be resolved (or rejected). For this scenario, `fs.createWriteStream` is strongly recommended.
|
|
4849
|
-
* @param handle A `FileHandle`.
|
|
4850
|
-
* @param string A string to write. If something other than a string is supplied it will be coerced to a string.
|
|
4851
|
-
* @param position The offset from the beginning of the file where this data should be written. If not supplied, defaults to the current position.
|
|
4852
|
-
* @param encoding The expected string encoding.
|
|
4853
|
-
*/
|
|
4854
|
-
function write(handle: FileHandle, string: any, position?: number | null, encoding?: string | null): Promise<{ bytesWritten: number, buffer: string }>;
|
|
4855
|
-
|
|
4856
|
-
/**
|
|
4857
|
-
* Asynchronous rename(2) - Change the name or location of a file or directory.
|
|
4858
|
-
* @param oldPath A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
4859
|
-
* URL support is _experimental_.
|
|
4860
|
-
* @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
4861
|
-
* URL support is _experimental_.
|
|
4862
|
-
*/
|
|
4863
|
-
function rename(oldPath: PathLike, newPath: PathLike): Promise<void>;
|
|
4864
|
-
|
|
4865
|
-
/**
|
|
4866
|
-
* Asynchronous truncate(2) - Truncate a file to a specified length.
|
|
4867
|
-
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
4868
|
-
* @param len If not specified, defaults to `0`.
|
|
4869
|
-
*/
|
|
4870
|
-
function truncate(path: PathLike, len?: number): Promise<void>;
|
|
4871
|
-
|
|
4872
|
-
/**
|
|
4873
|
-
* Asynchronous ftruncate(2) - Truncate a file to a specified length.
|
|
4874
|
-
* @param handle A `FileHandle`.
|
|
4875
|
-
* @param len If not specified, defaults to `0`.
|
|
4876
|
-
*/
|
|
4877
|
-
function ftruncate(handle: FileHandle, len?: number): Promise<void>;
|
|
4878
|
-
|
|
4879
|
-
/**
|
|
4880
|
-
* Asynchronous rmdir(2) - delete a directory.
|
|
4881
|
-
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
4882
|
-
*/
|
|
4883
|
-
function rmdir(path: PathLike): Promise<void>;
|
|
4884
|
-
|
|
4885
|
-
/**
|
|
4886
|
-
* Asynchronous fdatasync(2) - synchronize a file's in-core state with storage device.
|
|
4887
|
-
* @param handle A `FileHandle`.
|
|
4888
|
-
*/
|
|
4889
|
-
function fdatasync(handle: FileHandle): Promise<void>;
|
|
4890
|
-
|
|
4891
|
-
/**
|
|
4892
|
-
* Asynchronous fsync(2) - synchronize a file's in-core state with the underlying storage device.
|
|
4893
|
-
* @param handle A `FileHandle`.
|
|
4894
|
-
*/
|
|
4895
|
-
function fsync(handle: FileHandle): Promise<void>;
|
|
4896
|
-
|
|
4897
|
-
/**
|
|
4898
|
-
* Asynchronous mkdir(2) - create a directory.
|
|
4899
|
-
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
4900
|
-
* @param mode A file mode. If a string is passed, it is parsed as an octal integer. If not specified, defaults to `0o777`.
|
|
4901
|
-
*/
|
|
4902
|
-
function mkdir(path: PathLike, mode?: string | number): Promise<void>;
|
|
4903
|
-
|
|
4904
|
-
/**
|
|
4905
|
-
* Asynchronous readdir(3) - read a directory.
|
|
4906
|
-
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
4907
|
-
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
4908
|
-
*/
|
|
4909
|
-
function readdir(path: PathLike, options?: { encoding?: BufferEncoding | null } | BufferEncoding | null): Promise<string[]>;
|
|
4910
|
-
|
|
4911
|
-
/**
|
|
4912
|
-
* Asynchronous readdir(3) - read a directory.
|
|
4913
|
-
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
4914
|
-
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
4915
|
-
*/
|
|
4916
|
-
function readdir(path: PathLike, options: { encoding: "buffer" } | "buffer"): Promise<Buffer[]>;
|
|
4913
|
+
/**
|
|
4914
|
+
* Asynchronous readdir(3) - read a directory.
|
|
4915
|
+
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
4916
|
+
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
4917
|
+
*/
|
|
4918
|
+
function readdir(path: PathLike, options: { encoding: "buffer" } | "buffer"): Promise<Buffer[]>;
|
|
4917
4919
|
|
|
4918
|
-
|
|
4919
|
-
|
|
4920
|
-
|
|
4921
|
-
|
|
4922
|
-
|
|
4923
|
-
|
|
4920
|
+
/**
|
|
4921
|
+
* Asynchronous readdir(3) - read a directory.
|
|
4922
|
+
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
4923
|
+
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
4924
|
+
*/
|
|
4925
|
+
function readdir(path: PathLike, options?: { encoding?: string | null } | string | null): Promise<string[] | Buffer[]>;
|
|
4924
4926
|
|
|
4925
|
-
|
|
4926
|
-
|
|
4927
|
-
|
|
4928
|
-
|
|
4929
|
-
|
|
4930
|
-
|
|
4927
|
+
/**
|
|
4928
|
+
* Asynchronous readlink(2) - read value of a symbolic link.
|
|
4929
|
+
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
4930
|
+
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
4931
|
+
*/
|
|
4932
|
+
function readlink(path: PathLike, options?: { encoding?: BufferEncoding | null } | BufferEncoding | null): Promise<string>;
|
|
4931
4933
|
|
|
4932
|
-
|
|
4933
|
-
|
|
4934
|
-
|
|
4935
|
-
|
|
4936
|
-
|
|
4937
|
-
|
|
4934
|
+
/**
|
|
4935
|
+
* Asynchronous readlink(2) - read value of a symbolic link.
|
|
4936
|
+
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
4937
|
+
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
4938
|
+
*/
|
|
4939
|
+
function readlink(path: PathLike, options: { encoding: "buffer" } | "buffer"): Promise<Buffer>;
|
|
4938
4940
|
|
|
4939
|
-
|
|
4940
|
-
|
|
4941
|
-
|
|
4942
|
-
|
|
4943
|
-
|
|
4944
|
-
|
|
4941
|
+
/**
|
|
4942
|
+
* Asynchronous readlink(2) - read value of a symbolic link.
|
|
4943
|
+
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
4944
|
+
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
4945
|
+
*/
|
|
4946
|
+
function readlink(path: PathLike, options?: { encoding?: string | null } | string | null): Promise<string | Buffer>;
|
|
4945
4947
|
|
|
4946
|
-
|
|
4947
|
-
|
|
4948
|
-
|
|
4949
|
-
|
|
4950
|
-
|
|
4951
|
-
|
|
4952
|
-
|
|
4953
|
-
|
|
4948
|
+
/**
|
|
4949
|
+
* Asynchronous symlink(2) - Create a new symbolic link to an existing file.
|
|
4950
|
+
* @param target A path to an existing file. If a URL is provided, it must use the `file:` protocol.
|
|
4951
|
+
* @param path A path to the new symlink. If a URL is provided, it must use the `file:` protocol.
|
|
4952
|
+
* @param type May be set to `'dir'`, `'file'`, or `'junction'` (default is `'file'`) and is only available on Windows (ignored on other platforms).
|
|
4953
|
+
* When using `'junction'`, the `target` argument will automatically be normalized to an absolute path.
|
|
4954
|
+
*/
|
|
4955
|
+
function symlink(target: PathLike, path: PathLike, type?: string | null): Promise<void>;
|
|
4954
4956
|
|
|
4955
|
-
|
|
4956
|
-
|
|
4957
|
-
|
|
4958
|
-
|
|
4959
|
-
|
|
4957
|
+
/**
|
|
4958
|
+
* Asynchronous fstat(2) - Get file status.
|
|
4959
|
+
* @param handle A `FileHandle`.
|
|
4960
|
+
*/
|
|
4961
|
+
function fstat(handle: FileHandle): Promise<Stats>;
|
|
4960
4962
|
|
|
4961
|
-
|
|
4962
|
-
|
|
4963
|
-
|
|
4964
|
-
|
|
4965
|
-
|
|
4963
|
+
/**
|
|
4964
|
+
* Asynchronous lstat(2) - Get file status. Does not dereference symbolic links.
|
|
4965
|
+
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
4966
|
+
*/
|
|
4967
|
+
function lstat(path: PathLike): Promise<Stats>;
|
|
4966
4968
|
|
|
4967
|
-
|
|
4968
|
-
|
|
4969
|
-
|
|
4970
|
-
|
|
4971
|
-
|
|
4969
|
+
/**
|
|
4970
|
+
* Asynchronous stat(2) - Get file status.
|
|
4971
|
+
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
4972
|
+
*/
|
|
4973
|
+
function stat(path: PathLike): Promise<Stats>;
|
|
4972
4974
|
|
|
4973
|
-
|
|
4974
|
-
|
|
4975
|
-
|
|
4976
|
-
|
|
4977
|
-
|
|
4978
|
-
|
|
4975
|
+
/**
|
|
4976
|
+
* Asynchronous link(2) - Create a new link (also known as a hard link) to an existing file.
|
|
4977
|
+
* @param existingPath A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
4978
|
+
* @param newPath A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
4979
|
+
*/
|
|
4980
|
+
function link(existingPath: PathLike, newPath: PathLike): Promise<void>;
|
|
4979
4981
|
|
|
4980
|
-
|
|
4981
|
-
|
|
4982
|
-
|
|
4983
|
-
|
|
4984
|
-
|
|
4982
|
+
/**
|
|
4983
|
+
* Asynchronous unlink(2) - delete a name and possibly the file it refers to.
|
|
4984
|
+
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
4985
|
+
*/
|
|
4986
|
+
function unlink(path: PathLike): Promise<void>;
|
|
4985
4987
|
|
|
4986
|
-
|
|
4987
|
-
|
|
4988
|
-
|
|
4989
|
-
|
|
4990
|
-
|
|
4991
|
-
|
|
4988
|
+
/**
|
|
4989
|
+
* Asynchronous fchmod(2) - Change permissions of a file.
|
|
4990
|
+
* @param handle A `FileHandle`.
|
|
4991
|
+
* @param mode A file mode. If a string is passed, it is parsed as an octal integer.
|
|
4992
|
+
*/
|
|
4993
|
+
function fchmod(handle: FileHandle, mode: string | number): Promise<void>;
|
|
4992
4994
|
|
|
4993
|
-
|
|
4994
|
-
|
|
4995
|
-
|
|
4996
|
-
|
|
4997
|
-
|
|
4998
|
-
|
|
4995
|
+
/**
|
|
4996
|
+
* Asynchronous chmod(2) - Change permissions of a file.
|
|
4997
|
+
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
4998
|
+
* @param mode A file mode. If a string is passed, it is parsed as an octal integer.
|
|
4999
|
+
*/
|
|
5000
|
+
function chmod(path: PathLike, mode: string | number): Promise<void>;
|
|
4999
5001
|
|
|
5000
|
-
|
|
5001
|
-
|
|
5002
|
-
|
|
5003
|
-
|
|
5004
|
-
|
|
5005
|
-
|
|
5002
|
+
/**
|
|
5003
|
+
* Asynchronous lchmod(2) - Change permissions of a file. Does not dereference symbolic links.
|
|
5004
|
+
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
5005
|
+
* @param mode A file mode. If a string is passed, it is parsed as an octal integer.
|
|
5006
|
+
*/
|
|
5007
|
+
function lchmod(path: PathLike, mode: string | number): Promise<void>;
|
|
5006
5008
|
|
|
5007
|
-
|
|
5008
|
-
|
|
5009
|
-
|
|
5010
|
-
|
|
5011
|
-
|
|
5009
|
+
/**
|
|
5010
|
+
* Asynchronous lchown(2) - Change ownership of a file. Does not dereference symbolic links.
|
|
5011
|
+
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
5012
|
+
*/
|
|
5013
|
+
function lchown(path: PathLike, uid: number, gid: number): Promise<void>;
|
|
5012
5014
|
|
|
5013
|
-
|
|
5014
|
-
|
|
5015
|
-
|
|
5016
|
-
|
|
5017
|
-
|
|
5015
|
+
/**
|
|
5016
|
+
* Asynchronous fchown(2) - Change ownership of a file.
|
|
5017
|
+
* @param handle A `FileHandle`.
|
|
5018
|
+
*/
|
|
5019
|
+
function fchown(handle: FileHandle, uid: number, gid: number): Promise<void>;
|
|
5018
5020
|
|
|
5019
|
-
|
|
5020
|
-
|
|
5021
|
-
|
|
5022
|
-
|
|
5023
|
-
|
|
5021
|
+
/**
|
|
5022
|
+
* Asynchronous chown(2) - Change ownership of a file.
|
|
5023
|
+
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
5024
|
+
*/
|
|
5025
|
+
function chown(path: PathLike, uid: number, gid: number): Promise<void>;
|
|
5024
5026
|
|
|
5025
|
-
|
|
5026
|
-
|
|
5027
|
-
|
|
5028
|
-
|
|
5029
|
-
|
|
5030
|
-
|
|
5031
|
-
|
|
5027
|
+
/**
|
|
5028
|
+
* Asynchronously change file timestamps of the file referenced by the supplied path.
|
|
5029
|
+
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
5030
|
+
* @param atime The last access time. If a string is provided, it will be coerced to number.
|
|
5031
|
+
* @param mtime The last modified time. If a string is provided, it will be coerced to number.
|
|
5032
|
+
*/
|
|
5033
|
+
function utimes(path: PathLike, atime: string | number | Date, mtime: string | number | Date): Promise<void>;
|
|
5032
5034
|
|
|
5033
|
-
|
|
5034
|
-
|
|
5035
|
-
|
|
5036
|
-
|
|
5037
|
-
|
|
5038
|
-
|
|
5039
|
-
|
|
5035
|
+
/**
|
|
5036
|
+
* Asynchronously change file timestamps of the file referenced by the supplied `FileHandle`.
|
|
5037
|
+
* @param handle A `FileHandle`.
|
|
5038
|
+
* @param atime The last access time. If a string is provided, it will be coerced to number.
|
|
5039
|
+
* @param mtime The last modified time. If a string is provided, it will be coerced to number.
|
|
5040
|
+
*/
|
|
5041
|
+
function futimes(handle: FileHandle, atime: string | number | Date, mtime: string | number | Date): Promise<void>;
|
|
5040
5042
|
|
|
5041
|
-
|
|
5042
|
-
|
|
5043
|
-
|
|
5044
|
-
|
|
5045
|
-
|
|
5046
|
-
|
|
5043
|
+
/**
|
|
5044
|
+
* Asynchronous realpath(3) - return the canonicalized absolute pathname.
|
|
5045
|
+
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
5046
|
+
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
5047
|
+
*/
|
|
5048
|
+
function realpath(path: PathLike, options?: { encoding?: BufferEncoding | null } | BufferEncoding | null): Promise<string>;
|
|
5047
5049
|
|
|
5048
|
-
|
|
5049
|
-
|
|
5050
|
-
|
|
5051
|
-
|
|
5052
|
-
|
|
5053
|
-
|
|
5050
|
+
/**
|
|
5051
|
+
* Asynchronous realpath(3) - return the canonicalized absolute pathname.
|
|
5052
|
+
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
5053
|
+
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
5054
|
+
*/
|
|
5055
|
+
function realpath(path: PathLike, options: { encoding: "buffer" } | "buffer"): Promise<Buffer>;
|
|
5054
5056
|
|
|
5055
|
-
|
|
5056
|
-
|
|
5057
|
-
|
|
5058
|
-
|
|
5059
|
-
|
|
5060
|
-
|
|
5057
|
+
/**
|
|
5058
|
+
* Asynchronous realpath(3) - return the canonicalized absolute pathname.
|
|
5059
|
+
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
5060
|
+
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
5061
|
+
*/
|
|
5062
|
+
function realpath(path: PathLike, options?: { encoding?: string | null } | string | null): Promise<string | Buffer>;
|
|
5061
5063
|
|
|
5062
|
-
|
|
5063
|
-
|
|
5064
|
-
|
|
5065
|
-
|
|
5066
|
-
|
|
5067
|
-
|
|
5064
|
+
/**
|
|
5065
|
+
* Asynchronously creates a unique temporary directory.
|
|
5066
|
+
* Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory.
|
|
5067
|
+
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
5068
|
+
*/
|
|
5069
|
+
function mkdtemp(prefix: string, options?: { encoding?: BufferEncoding | null } | BufferEncoding | null): Promise<string>;
|
|
5068
5070
|
|
|
5069
|
-
|
|
5070
|
-
|
|
5071
|
-
|
|
5072
|
-
|
|
5073
|
-
|
|
5074
|
-
|
|
5071
|
+
/**
|
|
5072
|
+
* Asynchronously creates a unique temporary directory.
|
|
5073
|
+
* Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory.
|
|
5074
|
+
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
5075
|
+
*/
|
|
5076
|
+
function mkdtemp(prefix: string, options: { encoding: "buffer" } | "buffer"): Promise<Buffer>;
|
|
5075
5077
|
|
|
5076
|
-
|
|
5077
|
-
|
|
5078
|
-
|
|
5079
|
-
|
|
5080
|
-
|
|
5081
|
-
|
|
5078
|
+
/**
|
|
5079
|
+
* Asynchronously creates a unique temporary directory.
|
|
5080
|
+
* Generates six random characters to be appended behind a required `prefix` to create a unique temporary directory.
|
|
5081
|
+
* @param options The encoding (or an object specifying the encoding), used as the encoding of the result. If not provided, `'utf8'` is used.
|
|
5082
|
+
*/
|
|
5083
|
+
function mkdtemp(prefix: string, options?: { encoding?: string | null } | string | null): Promise<string | Buffer>;
|
|
5082
5084
|
|
|
5083
|
-
|
|
5084
|
-
|
|
5085
|
-
|
|
5086
|
-
|
|
5087
|
-
|
|
5088
|
-
|
|
5089
|
-
|
|
5090
|
-
|
|
5091
|
-
|
|
5092
|
-
|
|
5093
|
-
|
|
5094
|
-
|
|
5095
|
-
|
|
5096
|
-
|
|
5085
|
+
/**
|
|
5086
|
+
* Asynchronously writes data to a file, replacing the file if it already exists.
|
|
5087
|
+
* It is unsafe to call `fsPromises.writeFile()` multiple times on the same file without waiting for the `Promise` to be resolved (or rejected).
|
|
5088
|
+
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
5089
|
+
* URL support is _experimental_.
|
|
5090
|
+
* If a `FileHandle` is provided, the underlying file will _not_ be closed automatically.
|
|
5091
|
+
* @param data The data to write. If something other than a `Buffer` or `Uint8Array` is provided, the value is coerced to a string.
|
|
5092
|
+
* @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag.
|
|
5093
|
+
* If `encoding` is not supplied, the default of `'utf8'` is used.
|
|
5094
|
+
* If `mode` is not supplied, the default of `0o666` is used.
|
|
5095
|
+
* If `mode` is a string, it is parsed as an octal integer.
|
|
5096
|
+
* If `flag` is not supplied, the default of `'w'` is used.
|
|
5097
|
+
*/
|
|
5098
|
+
function writeFile(path: PathLike | FileHandle, data: any, options?: { encoding?: string | null, mode?: string | number, flag?: string | number } | string | null): Promise<void>;
|
|
5097
5099
|
|
|
5098
|
-
|
|
5099
|
-
|
|
5100
|
-
|
|
5101
|
-
|
|
5102
|
-
|
|
5103
|
-
|
|
5104
|
-
|
|
5105
|
-
|
|
5106
|
-
|
|
5107
|
-
|
|
5108
|
-
|
|
5109
|
-
|
|
5110
|
-
|
|
5100
|
+
/**
|
|
5101
|
+
* Asynchronously append data to a file, creating the file if it does not exist.
|
|
5102
|
+
* @param file A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
5103
|
+
* URL support is _experimental_.
|
|
5104
|
+
* If a `FileHandle` is provided, the underlying file will _not_ be closed automatically.
|
|
5105
|
+
* @param data The data to write. If something other than a `Buffer` or `Uint8Array` is provided, the value is coerced to a string.
|
|
5106
|
+
* @param options Either the encoding for the file, or an object optionally specifying the encoding, file mode, and flag.
|
|
5107
|
+
* If `encoding` is not supplied, the default of `'utf8'` is used.
|
|
5108
|
+
* If `mode` is not supplied, the default of `0o666` is used.
|
|
5109
|
+
* If `mode` is a string, it is parsed as an octal integer.
|
|
5110
|
+
* If `flag` is not supplied, the default of `'a'` is used.
|
|
5111
|
+
*/
|
|
5112
|
+
function appendFile(path: PathLike | FileHandle, data: any, options?: { encoding?: string | null, mode?: string | number, flag?: string | number } | string | null): Promise<void>;
|
|
5111
5113
|
|
|
5112
|
-
|
|
5113
|
-
|
|
5114
|
-
|
|
5115
|
-
|
|
5116
|
-
|
|
5117
|
-
|
|
5118
|
-
|
|
5119
|
-
|
|
5114
|
+
/**
|
|
5115
|
+
* Asynchronously reads the entire contents of a file.
|
|
5116
|
+
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
5117
|
+
* If a `FileHandle` is provided, the underlying file will _not_ be closed automatically.
|
|
5118
|
+
* @param options An object that may contain an optional flag.
|
|
5119
|
+
* If a flag is not provided, it defaults to `'r'`.
|
|
5120
|
+
*/
|
|
5121
|
+
function readFile(path: PathLike | FileHandle, options?: { encoding?: null, flag?: string | number } | null): Promise<Buffer>;
|
|
5120
5122
|
|
|
5121
|
-
|
|
5122
|
-
|
|
5123
|
-
|
|
5124
|
-
|
|
5125
|
-
|
|
5126
|
-
|
|
5127
|
-
|
|
5128
|
-
|
|
5123
|
+
/**
|
|
5124
|
+
* Asynchronously reads the entire contents of a file.
|
|
5125
|
+
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
5126
|
+
* If a `FileHandle` is provided, the underlying file will _not_ be closed automatically.
|
|
5127
|
+
* @param options An object that may contain an optional flag.
|
|
5128
|
+
* If a flag is not provided, it defaults to `'r'`.
|
|
5129
|
+
*/
|
|
5130
|
+
function readFile(path: PathLike | FileHandle, options: { encoding: BufferEncoding, flag?: string | number } | BufferEncoding): Promise<string>;
|
|
5129
5131
|
|
|
5130
|
-
|
|
5131
|
-
|
|
5132
|
-
|
|
5133
|
-
|
|
5134
|
-
|
|
5135
|
-
|
|
5136
|
-
|
|
5137
|
-
|
|
5132
|
+
/**
|
|
5133
|
+
* Asynchronously reads the entire contents of a file.
|
|
5134
|
+
* @param path A path to a file. If a URL is provided, it must use the `file:` protocol.
|
|
5135
|
+
* If a `FileHandle` is provided, the underlying file will _not_ be closed automatically.
|
|
5136
|
+
* @param options An object that may contain an optional flag.
|
|
5137
|
+
* If a flag is not provided, it defaults to `'r'`.
|
|
5138
|
+
*/
|
|
5139
|
+
function readFile(path: PathLike | FileHandle, options?: { encoding?: string | null, flag?: string | number } | string | null): Promise<string | Buffer>;
|
|
5140
|
+
}
|
|
5138
5141
|
}
|
|
5139
5142
|
|
|
5140
5143
|
declare module "path" {
|
|
@@ -5715,6 +5718,8 @@ declare module "crypto" {
|
|
|
5715
5718
|
digest(): Buffer;
|
|
5716
5719
|
digest(encoding: HexBase64Latin1Encoding): string;
|
|
5717
5720
|
}
|
|
5721
|
+
|
|
5722
|
+
/** @deprecated since v10.0.0 use createCipheriv() */
|
|
5718
5723
|
export function createCipher(algorithm: string, password: any): Cipher;
|
|
5719
5724
|
export function createCipheriv(algorithm: string, key: any, iv: any): Cipher;
|
|
5720
5725
|
export interface Cipher extends NodeJS.ReadWriteStream {
|
|
@@ -5728,6 +5733,7 @@ declare module "crypto" {
|
|
|
5728
5733
|
getAuthTag(): Buffer;
|
|
5729
5734
|
setAAD(buffer: Buffer): this;
|
|
5730
5735
|
}
|
|
5736
|
+
/** @deprecated since v10.0.0 use createCipheriv() */
|
|
5731
5737
|
export function createDecipher(algorithm: string, password: any): Decipher;
|
|
5732
5738
|
export function createDecipheriv(algorithm: string, key: any, iv: any): Decipher;
|
|
5733
5739
|
export interface Decipher extends NodeJS.ReadWriteStream {
|
|
@@ -5813,17 +5819,16 @@ declare module "crypto" {
|
|
|
5813
5819
|
export function getCurves(): string[];
|
|
5814
5820
|
export function getHashes(): string[];
|
|
5815
5821
|
export interface ECDH {
|
|
5822
|
+
convertKey(key: string | Buffer /*| TypedArray*/ | DataView, curve: string, inputEncoding?: string, outputEncoding?: string, format?: string): Buffer | string;
|
|
5816
5823
|
generateKeys(): Buffer;
|
|
5817
|
-
generateKeys(encoding: HexBase64Latin1Encoding): string;
|
|
5818
|
-
generateKeys(encoding: HexBase64Latin1Encoding, format: ECDHKeyFormat): string;
|
|
5824
|
+
generateKeys(encoding: HexBase64Latin1Encoding, format?: ECDHKeyFormat): string;
|
|
5819
5825
|
computeSecret(other_public_key: Buffer): Buffer;
|
|
5820
5826
|
computeSecret(other_public_key: string, input_encoding: HexBase64Latin1Encoding): Buffer;
|
|
5821
5827
|
computeSecret(other_public_key: string, input_encoding: HexBase64Latin1Encoding, output_encoding: HexBase64Latin1Encoding): string;
|
|
5822
5828
|
getPrivateKey(): Buffer;
|
|
5823
5829
|
getPrivateKey(encoding: HexBase64Latin1Encoding): string;
|
|
5824
5830
|
getPublicKey(): Buffer;
|
|
5825
|
-
getPublicKey(encoding: HexBase64Latin1Encoding): string;
|
|
5826
|
-
getPublicKey(encoding: HexBase64Latin1Encoding, format: ECDHKeyFormat): string;
|
|
5831
|
+
getPublicKey(encoding: HexBase64Latin1Encoding, format?: ECDHKeyFormat): string;
|
|
5827
5832
|
setPrivateKey(private_key: Buffer): void;
|
|
5828
5833
|
setPrivateKey(private_key: string, encoding: HexBase64Latin1Encoding): void;
|
|
5829
5834
|
}
|
|
@@ -6220,6 +6225,38 @@ declare module "util" {
|
|
|
6220
6225
|
export function isWeakSet(object: any): object is WeakSet<any>;
|
|
6221
6226
|
export function isWebAssemblyCompiledModule(object: any): boolean;
|
|
6222
6227
|
}
|
|
6228
|
+
|
|
6229
|
+
export class TextDecoder {
|
|
6230
|
+
readonly encoding: string;
|
|
6231
|
+
readonly fatal: boolean;
|
|
6232
|
+
readonly ignoreBOM: boolean;
|
|
6233
|
+
constructor(
|
|
6234
|
+
encoding?: string,
|
|
6235
|
+
options?: { fatal?: boolean; ignoreBOM?: boolean }
|
|
6236
|
+
);
|
|
6237
|
+
decode(
|
|
6238
|
+
input?:
|
|
6239
|
+
Int8Array
|
|
6240
|
+
| Int16Array
|
|
6241
|
+
| Int32Array
|
|
6242
|
+
| Uint8Array
|
|
6243
|
+
| Uint16Array
|
|
6244
|
+
| Uint32Array
|
|
6245
|
+
| Uint8ClampedArray
|
|
6246
|
+
| Float32Array
|
|
6247
|
+
| Float64Array
|
|
6248
|
+
| DataView
|
|
6249
|
+
| ArrayBuffer
|
|
6250
|
+
| null,
|
|
6251
|
+
options?: { stream?: boolean }
|
|
6252
|
+
): string;
|
|
6253
|
+
}
|
|
6254
|
+
|
|
6255
|
+
export class TextEncoder {
|
|
6256
|
+
readonly encoding: string;
|
|
6257
|
+
constructor();
|
|
6258
|
+
encode(input?: string): Uint8Array;
|
|
6259
|
+
}
|
|
6223
6260
|
}
|
|
6224
6261
|
|
|
6225
6262
|
declare module "assert" {
|
|
@@ -6240,11 +6277,16 @@ declare module "assert" {
|
|
|
6240
6277
|
}
|
|
6241
6278
|
|
|
6242
6279
|
export function fail(message: string): never;
|
|
6280
|
+
/** @deprecated since v10.0.0 */
|
|
6243
6281
|
export function fail(actual: any, expected: any, message?: string, operator?: string): never;
|
|
6244
6282
|
export function ok(value: any, message?: string): void;
|
|
6283
|
+
/** @deprecated use strictEqual() */
|
|
6245
6284
|
export function equal(actual: any, expected: any, message?: string): void;
|
|
6285
|
+
/** @deprecated use notStrictEqual() */
|
|
6246
6286
|
export function notEqual(actual: any, expected: any, message?: string): void;
|
|
6287
|
+
/** @deprecated use deepStrictEqual() */
|
|
6247
6288
|
export function deepEqual(actual: any, expected: any, message?: string): void;
|
|
6289
|
+
/** @deprecated use notDeepStrictEqual() */
|
|
6248
6290
|
export function notDeepEqual(acutal: any, expected: any, message?: string): void;
|
|
6249
6291
|
export function strictEqual(actual: any, expected: any, message?: string): void;
|
|
6250
6292
|
export function notStrictEqual(actual: any, expected: any, message?: string): void;
|
|
@@ -6793,8 +6835,16 @@ declare module "http2" {
|
|
|
6793
6835
|
import * as tls from "tls";
|
|
6794
6836
|
import * as url from "url";
|
|
6795
6837
|
|
|
6796
|
-
import { IncomingHttpHeaders, OutgoingHttpHeaders } from "http";
|
|
6797
|
-
export {
|
|
6838
|
+
import { IncomingHttpHeaders as Http1IncomingHttpHeaders, OutgoingHttpHeaders } from "http";
|
|
6839
|
+
export { OutgoingHttpHeaders } from "http";
|
|
6840
|
+
|
|
6841
|
+
export interface IncomingHttpHeaders extends Http1IncomingHttpHeaders {
|
|
6842
|
+
':path'?: string;
|
|
6843
|
+
':method'?: string;
|
|
6844
|
+
':status'?: string;
|
|
6845
|
+
':authority'?: string;
|
|
6846
|
+
':scheme'?: string;
|
|
6847
|
+
}
|
|
6798
6848
|
|
|
6799
6849
|
// Http2Stream
|
|
6800
6850
|
|
node/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "10.0
|
|
3
|
+
"version": "10.1.0",
|
|
4
4
|
"description": "TypeScript definitions for Node.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"contributors": [
|
|
@@ -116,6 +116,11 @@
|
|
|
116
116
|
"name": "Alexander T.",
|
|
117
117
|
"url": "https://github.com/a-tarasyuk",
|
|
118
118
|
"githubUsername": "a-tarasyuk"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"name": "Lishude",
|
|
122
|
+
"url": "https://github.com/islishude",
|
|
123
|
+
"githubUsername": "islishude"
|
|
119
124
|
}
|
|
120
125
|
],
|
|
121
126
|
"main": "",
|
|
@@ -125,6 +130,6 @@
|
|
|
125
130
|
},
|
|
126
131
|
"scripts": {},
|
|
127
132
|
"dependencies": {},
|
|
128
|
-
"typesPublisherContentHash": "
|
|
133
|
+
"typesPublisherContentHash": "b9a6e57a599c96f9ff1bfbd55b43a19ab3014cecce163fe4a2febef277f03de2",
|
|
129
134
|
"typeScriptVersion": "2.0"
|
|
130
135
|
}
|