15815213711
2024-08-26 67b8b6731811983447e053d4396b3708c14dfe3c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
// Type definitions for fs-extra 9.0
// Project: https://github.com/jprichardson/node-fs-extra
// Definitions by: Alan Agius <https://github.com/alan-agius4>,
//                 midknight41 <https://github.com/midknight41>,
//                 Brendan Forster <https://github.com/shiftkey>,
//                 Mees van Dijk <https://github.com/mees->,
//                 Justin Rockwood <https://github.com/jrockwood>,
//                 Sang Dang <https://github.com/sangdth>,
//                 Florian Keller <https://github.com/ffflorian>
//                 Piotr Błażejewicz <https://github.com/peterblazejewicz>
//                 Tiger Oakes <https://github.com/NotWoods>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// Minimum TypeScript Version: 3.9
 
/// <reference types="node" />
 
import * as fs from 'fs';
import Stats = fs.Stats;
import PathLike = fs.PathLike;
 
export * from 'fs';
 
export function copy(src: string, dest: string, options?: CopyOptions): Promise<void>;
export function copy(src: string, dest: string, callback: (err: Error) => void): void;
export function copy(src: string, dest: string, options: CopyOptions, callback: (err: Error) => void): void;
export function copySync(src: string, dest: string, options?: CopyOptionsSync): void;
 
export function copyFile(src: string, dest: string, flags?: number): Promise<void>;
export function copyFile(src: string, dest: string, callback: (err: Error) => void): void;
export function copyFile(src: string, dest: string, flags: number, callback: (err: Error) => void): void;
 
export function move(src: string, dest: string, options?: MoveOptions): Promise<void>;
export function move(src: string, dest: string, callback: (err: Error) => void): void;
export function move(src: string, dest: string, options: MoveOptions, callback: (err: Error) => void): void;
export function moveSync(src: string, dest: string, options?: MoveOptions): void;
 
export function createFile(file: string): Promise<void>;
export function createFile(file: string, callback: (err: Error) => void): void;
export function createFileSync(file: string): void;
 
export function createSymlink(src: string, dest: string, type: SymlinkType): Promise<void>;
export function createSymlink(src: string, dest: string, type: SymlinkType, callback?: (err: Error) => void): void;
export function createSymlinkSync(src: string, dest: string, type: SymlinkType): void;
 
export function ensureDir(path: string, options?: EnsureOptions | number): Promise<void>;
export function ensureDir(path: string, callback?: (err: Error) => void): void;
export function ensureDir(path: string, options?: EnsureOptions | number, callback?: (err: Error) => void): void;
export function ensureDirSync(path: string, options?: EnsureOptions | number): void;
 
export function mkdirs(dir: string): Promise<void>;
export function mkdirs(dir: string, callback: (err: Error) => void): void;
export function mkdirp(dir: string): Promise<void>;
export function mkdirp(dir: string, callback: (err: Error) => void): void;
export function mkdirsSync(dir: string): void;
export function mkdirpSync(dir: string): void;
 
export function outputFile(
    file: string,
    data: any,
    options?: WriteFileOptions | BufferEncoding | string,
): Promise<void>;
export function outputFile(file: string, data: any, callback: (err: Error) => void): void;
export function outputFile(
    file: string,
    data: any,
    options: WriteFileOptions | string,
    callback: (err: Error) => void,
): void;
export function outputFileSync(file: string, data: any, options?: WriteFileOptions | BufferEncoding | string): void;
 
export function readJson(file: string, options?: ReadOptions | BufferEncoding | string): Promise<any>;
export function readJson(file: string, callback: (err: Error, jsonObject: any) => void): void;
export function readJson(
    file: string,
    options: ReadOptions | BufferEncoding | string,
    callback: (err: Error, jsonObject: any) => void,
): void;
export function readJSON(file: string, options?: ReadOptions | BufferEncoding | string): Promise<any>;
export function readJSON(file: string, callback: (err: Error, jsonObject: any) => void): void;
export function readJSON(
    file: string,
    options: ReadOptions | BufferEncoding | string,
    callback: (err: Error, jsonObject: any) => void,
): void;
 
export function readJsonSync(file: string, options?: ReadOptions | BufferEncoding | string): any;
export function readJSONSync(file: string, options?: ReadOptions | BufferEncoding | string): any;
 
export function remove(dir: string, callback: (err: Error) => void): void;
export function remove(dir: string, callback?: (err: Error) => void): Promise<void>;
export function removeSync(dir: string): void;
 
export function outputJSON(file: string, data: any, options?: WriteOptions | BufferEncoding | string): Promise<void>;
export function outputJSON(
    file: string,
    data: any,
    options: WriteOptions | BufferEncoding | string,
    callback: (err: Error) => void,
): void;
export function outputJSON(file: string, data: any, callback: (err: Error) => void): void;
export function outputJson(file: string, data: any, options?: WriteOptions | BufferEncoding | string): Promise<void>;
export function outputJson(
    file: string,
    data: any,
    options: WriteOptions | BufferEncoding | string,
    callback: (err: Error) => void,
): void;
export function outputJson(file: string, data: any, callback: (err: Error) => void): void;
export function outputJsonSync(file: string, data: any, options?: WriteOptions | BufferEncoding | string): void;
export function outputJSONSync(file: string, data: any, options?: WriteOptions | BufferEncoding | string): void;
 
export function writeJSON(file: string, object: any, options?: WriteOptions | BufferEncoding | string): Promise<void>;
export function writeJSON(file: string, object: any, callback: (err: Error) => void): void;
export function writeJSON(
    file: string,
    object: any,
    options: WriteOptions | BufferEncoding | string,
    callback: (err: Error) => void,
): void;
export function writeJson(file: string, object: any, options?: WriteOptions | BufferEncoding | string): Promise<void>;
export function writeJson(file: string, object: any, callback: (err: Error) => void): void;
export function writeJson(
    file: string,
    object: any,
    options: WriteOptions | BufferEncoding | string,
    callback: (err: Error) => void,
): void;
 
export function writeJsonSync(file: string, object: any, options?: WriteOptions | BufferEncoding | string): void;
export function writeJSONSync(file: string, object: any, options?: WriteOptions | BufferEncoding | string): void;
 
export function ensureFile(path: string): Promise<void>;
export function ensureFile(path: string, callback: (err: Error) => void): void;
export function ensureFileSync(path: string): void;
 
export function ensureLink(src: string, dest: string): Promise<void>;
export function ensureLink(src: string, dest: string, callback: (err: Error) => void): void;
// alias for ensureLink
export const createLink: typeof ensureLink;
export function ensureLinkSync(src: string, dest: string): void;
// aliased as
export const createLinkSync: typeof ensureLinkSync;
 
export function ensureSymlink(src: string, dest: string, type?: SymlinkType): Promise<void>;
export function ensureSymlink(src: string, dest: string, type: SymlinkType, callback: (err: Error) => void): void;
export function ensureSymlink(src: string, dest: string, callback: (err: Error) => void): void;
export function ensureSymlinkSync(src: string, dest: string, type?: SymlinkType): void;
 
export function emptyDir(path: string): Promise<void>;
export function emptyDir(path: string, callback: (err: Error) => void): void;
export const emptydir: typeof emptyDir;
 
export function emptyDirSync(path: string): void;
export const emptydirSync: typeof emptyDirSync;
 
export function pathExists(path: string): Promise<boolean>;
export function pathExists(path: string, callback: (err: Error, exists: boolean) => void): void;
export function pathExistsSync(path: string): boolean;
 
// fs async methods
// copied from https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/node/v6/index.d.ts
 
export function access(path: PathLike, callback: (err: NodeJS.ErrnoException) => void): void;
export function access(path: PathLike, mode: number, callback: (err: NodeJS.ErrnoException) => void): void;
export function access(path: PathLike, mode?: number): Promise<void>;
 
export function appendFile(
    file: PathLike | number,
    data: any,
    options: {
        encoding?: BufferEncoding | string | undefined;
        mode?: number | string | undefined;
        flag?: string | undefined;
    },
    callback: (err: NodeJS.ErrnoException) => void,
): void;
export function appendFile(file: PathLike | number, data: any, callback: (err: NodeJS.ErrnoException) => void): void;
export function appendFile(
    file: PathLike | number,
    data: any,
    options?:
        | {
              encoding?: BufferEncoding | string | undefined;
              mode?: number | string | undefined;
              flag?: string | undefined;
          }
        | BufferEncoding
        | string,
): Promise<void>;
 
export function chmod(path: PathLike, mode: Mode, callback: (err: NodeJS.ErrnoException) => void): void;
export function chmod(path: PathLike, mode: Mode): Promise<void>;
 
export function chown(path: PathLike, uid: number, gid: number): Promise<void>;
export function chown(path: PathLike, uid: number, gid: number, callback: (err: NodeJS.ErrnoException) => void): void;
 
export function close(fd: number, callback: (err: NodeJS.ErrnoException) => void): void;
export function close(fd: number): Promise<void>;
 
export function fchmod(fd: number, mode: Mode, callback: (err: NodeJS.ErrnoException) => void): void;
export function fchmod(fd: number, mode: Mode): Promise<void>;
 
export function fchown(fd: number, uid: number, gid: number, callback: (err: NodeJS.ErrnoException) => void): void;
export function fchown(fd: number, uid: number, gid: number): Promise<void>;
 
export function fdatasync(fd: number, callback: () => void): void;
export function fdatasync(fd: number): Promise<void>;
 
export function fstat(fd: number, callback: (err: NodeJS.ErrnoException, stats: Stats) => any): void;
export function fstat(fd: number): Promise<Stats>;
 
export function fsync(fd: number, callback: (err: NodeJS.ErrnoException) => void): void;
export function fsync(fd: number): Promise<void>;
 
export function ftruncate(fd: number, callback: (err: NodeJS.ErrnoException) => void): void;
export function ftruncate(fd: number, len: number, callback: (err: NodeJS.ErrnoException) => void): void;
export function ftruncate(fd: number, len?: number): Promise<void>;
 
export function futimes(fd: number, atime: number, mtime: number, callback: (err: NodeJS.ErrnoException) => void): void;
export function futimes(fd: number, atime: Date, mtime: Date, callback: (err: NodeJS.ErrnoException) => void): void;
export function futimes(fd: number, atime: number, mtime: number): Promise<void>;
export function futimes(fd: number, atime: Date, mtime: Date): Promise<void>;
 
export function lchown(path: PathLike, uid: number, gid: number, callback: (err: NodeJS.ErrnoException) => void): void;
export function lchown(path: PathLike, uid: number, gid: number): Promise<void>;
 
export function link(existingPath: PathLike, newPath: PathLike, callback: (err: NodeJS.ErrnoException) => void): void;
export function link(existingPath: PathLike, newPath: PathLike): Promise<void>;
 
export function lstat(path: PathLike, callback: (err: NodeJS.ErrnoException, stats: Stats) => any): void;
export function lstat(path: PathLike): Promise<Stats>;
 
/**
 * Asynchronous mkdir - creates the directory specified in {path}.  Parameter {mode} defaults to 0777.
 *
 * @param callback No arguments other than a possible exception are given to the completion callback.
 */
export function mkdir(path: PathLike, callback: (err: NodeJS.ErrnoException) => void): void;
/**
 * Asynchronous mkdir - creates the directory specified in {path}.  Parameter {mode} defaults to 0777.
 *
 * @param callback No arguments other than a possible exception are given to the completion callback.
 */
export function mkdir(
    path: PathLike,
    options: Mode | fs.MakeDirectoryOptions | null,
    callback: (err: NodeJS.ErrnoException) => void,
): void;
export function mkdir(path: PathLike, options?: Mode | fs.MakeDirectoryOptions | null): Promise<void>;
export function mkdirSync(path: PathLike, options?: Mode | fs.MakeDirectoryOptions | null): void;
 
export function open(
    path: PathLike,
    flags: string | number,
    callback: (err: NodeJS.ErrnoException, fd: number) => void,
): void;
export function open(
    path: PathLike,
    flags: string | number,
    mode: Mode,
    callback: (err: NodeJS.ErrnoException, fd: number) => void,
): void;
export function open(path: PathLike, flags: string | number, mode?: Mode | null): Promise<number>;
 
export function opendir(path: string, cb: (err: NodeJS.ErrnoException | null, dir: fs.Dir) => void): void;
export function opendir(
    path: string,
    options: fs.OpenDirOptions,
    cb: (err: NodeJS.ErrnoException | null, dir: fs.Dir) => void,
): void;
export function opendir(path: string, options?: fs.OpenDirOptions): Promise<fs.Dir>;
 
export function read<TBuffer extends ArrayBufferView>(
    fd: number,
    buffer: TBuffer,
    offset: number,
    length: number,
    position: number | null,
    callback: (err: NodeJS.ErrnoException, bytesRead: number, buffer: TBuffer) => void,
): void;
export function read<TBuffer extends ArrayBufferView>(
    fd: number,
    buffer: TBuffer,
    offset: number,
    length: number,
    position: number | null,
): Promise<{ bytesRead: number; buffer: TBuffer }>;
 
export function readFile(file: PathLike | number, callback: (err: NodeJS.ErrnoException, data: Buffer) => void): void;
export function readFile(
    file: PathLike | number,
    encoding: BufferEncoding | string,
    callback: (err: NodeJS.ErrnoException, data: string) => void,
): void;
export function readFile(
    file: PathLike | number,
    options: { flag?: string | undefined } | { encoding: BufferEncoding | string; flag?: string | undefined },
    callback: (err: NodeJS.ErrnoException, data: Buffer) => void,
): void;
export function readFile(
    file: PathLike | number,
    options: { flag?: string | undefined } | { encoding: BufferEncoding | string; flag?: string | undefined },
): Promise<string>;
// tslint:disable-next-line:unified-signatures
export function readFile(file: PathLike | number, encoding: BufferEncoding | string): Promise<string>;
export function readFile(file: PathLike | number): Promise<Buffer>;
 
export function readdir(path: PathLike, callback: (err: NodeJS.ErrnoException, files: string[]) => void): void;
export function readdir(
    path: PathLike,
    options: 'buffer' | { encoding: 'buffer'; withFileTypes?: false | undefined },
): Promise<Buffer[]>;
export function readdir(
    path: PathLike,
    options?:
        | { encoding: BufferEncoding | string | null; withFileTypes?: false | undefined }
        | BufferEncoding
        | string
        | null,
): Promise<string[]>;
export function readdir(
    path: PathLike,
    options?: { encoding?: BufferEncoding | string | null | undefined; withFileTypes?: false | undefined },
): Promise<string[] | Buffer[]>;
export function readdir(
    path: PathLike,
    options: { encoding?: BufferEncoding | string | null | undefined; withFileTypes: true },
): Promise<fs.Dirent[]>;
 
export function readlink(path: PathLike, callback: (err: NodeJS.ErrnoException, linkString: string) => any): void;
export function readlink(path: PathLike): Promise<string>;
 
export function realpath(path: PathLike, callback: (err: NodeJS.ErrnoException, resolvedPath: string) => any): void;
export function realpath(
    path: PathLike,
    cache: { [path: string]: string },
    callback: (err: NodeJS.ErrnoException, resolvedPath: string) => any,
): void;
export function realpath(path: PathLike, cache?: { [path: string]: string }): Promise<string>;
 
/* tslint:disable:unified-signatures */
export namespace realpath {
    const native: {
        (path: PathLike, options: { encoding: 'buffer' } | 'buffer'): Promise<Buffer>;
        (
            path: PathLike,
            options: { encoding: BufferEncoding | string | null } | BufferEncoding | string | undefined | null,
        ): Promise<string>;
        (path: PathLike, options: { encoding: BufferEncoding | string | null } | string | undefined | null): Promise<
            string | Buffer
        >;
        (path: PathLike): Promise<string>;
    } & typeof fs.realpath.native;
}
/* tslint:enable:unified-signatures */
 
export function rename(oldPath: PathLike, newPath: PathLike, callback: (err: NodeJS.ErrnoException) => void): void;
export function rename(oldPath: PathLike, newPath: PathLike): Promise<void>;
 
/**
 * Asynchronously removes files and directories (modeled on the standard POSIX
 * `rm` utility).
 *
 * Only available in node >= v14.14.0
 */
export function rm(
    path: PathLike,
    options?: {
        force?: boolean | undefined;
        maxRetries?: number | undefined;
        recursive?: boolean | undefined;
        retryDelay?: number | undefined;
    },
): Promise<void>;
 
/**
 * Asynchronous rmdir - removes the directory specified in {path}
 *
 * @param callback No arguments other than a possible exception are given to the completion callback.
 */
export function rmdir(path: PathLike, callback: (err: NodeJS.ErrnoException) => void): void;
export function rmdir(path: PathLike, options?: fs.RmDirOptions): Promise<void>;
 
export function stat(path: PathLike, callback: (err: NodeJS.ErrnoException, stats: Stats) => any): void;
export function stat(path: PathLike): Promise<Stats>;
 
export function symlink(
    target: PathLike,
    path: PathLike,
    type: SymlinkType | undefined,
    callback: (err: NodeJS.ErrnoException) => void,
): void;
export function symlink(target: PathLike, path: PathLike, callback: (err: NodeJS.ErrnoException) => void): void;
export function symlink(target: PathLike, path: PathLike, type?: SymlinkType): Promise<void>;
 
export function truncate(path: PathLike, callback: (err: NodeJS.ErrnoException) => void): void;
export function truncate(path: PathLike, len: number, callback: (err: NodeJS.ErrnoException) => void): void;
export function truncate(path: PathLike, len?: number): Promise<void>;
 
/**
 * Asynchronous unlink - deletes the file specified in {path}
 *
 * @param callback No arguments other than a possible exception are given to the completion callback.
 */
export function unlink(path: PathLike, callback: (err: NodeJS.ErrnoException) => void): void;
export function unlink(path: PathLike): Promise<void>;
 
export function utimes(
    path: PathLike,
    atime: number,
    mtime: number,
    callback: (err: NodeJS.ErrnoException) => void,
): void;
export function utimes(path: PathLike, atime: Date, mtime: Date, callback: (err: NodeJS.ErrnoException) => void): void;
export function utimes(path: PathLike, atime: number, mtime: number): Promise<void>;
export function utimes(path: PathLike, atime: Date, mtime: Date): Promise<void>;
 
export function write<TBuffer extends ArrayBufferView>(
    fd: number,
    buffer: TBuffer,
    offset: number,
    length: number,
    position: number | null,
    callback: (err: NodeJS.ErrnoException, written: number, buffer: TBuffer) => void,
): void;
export function write<TBuffer extends ArrayBufferView>(
    fd: number,
    buffer: TBuffer,
    offset: number,
    length: number,
    callback: (err: NodeJS.ErrnoException, written: number, buffer: TBuffer) => void,
): void;
export function write(
    fd: number,
    data: any,
    callback: (err: NodeJS.ErrnoException, written: number, str: string) => void,
): void;
export function write(
    fd: number,
    data: any,
    offset: number,
    callback: (err: NodeJS.ErrnoException, written: number, str: string) => void,
): void;
export function write(
    fd: number,
    data: any,
    offset: number,
    encoding: BufferEncoding | string,
    callback: (err: NodeJS.ErrnoException, written: number, str: string) => void,
): void;
export function write<TBuffer extends ArrayBufferView>(
    fd: number,
    buffer: TBuffer,
    offset?: number,
    length?: number,
    position?: number | null,
): Promise<{ bytesWritten: number; buffer: TBuffer }>;
export function write(
    fd: number,
    data: any,
    offset?: number,
    encoding?: BufferEncoding | string,
): Promise<{ bytesWritten: number; buffer: string }>;
 
export function writeFile(file: PathLike | number, data: any, callback: (err: NodeJS.ErrnoException) => void): void;
export function writeFile(
    file: PathLike | number,
    data: any,
    options?: WriteFileOptions | BufferEncoding | string,
): Promise<void>;
export function writeFile(
    file: PathLike | number,
    data: any,
    options: WriteFileOptions | BufferEncoding | string,
    callback: (err: NodeJS.ErrnoException) => void,
): void;
 
export function writev(
    fd: number,
    buffers: NodeJS.ArrayBufferView[],
    position: number,
    cb: (err: NodeJS.ErrnoException | null, bytesWritten: number, buffers: NodeJS.ArrayBufferView[]) => void,
): void;
export function writev(
    fd: number,
    buffers: NodeJS.ArrayBufferView[],
    cb: (err: NodeJS.ErrnoException | null, bytesWritten: number, buffers: NodeJS.ArrayBufferView[]) => void,
): void;
export function writev(fd: number, buffers: NodeJS.ArrayBufferView[], position?: number): Promise<WritevResult>;
 
/**
 * Asynchronous mkdtemp - Creates a unique temporary directory. Generates six random characters to be appended behind a required prefix to create a unique temporary directory.
 *
 * @param callback The created folder path is passed as a string to the callback's second parameter.
 */
export function mkdtemp(prefix: string): Promise<string>;
export function mkdtemp(prefix: string, callback: (err: NodeJS.ErrnoException, folder: string) => void): void;
 
export interface PathEntry {
    path: string;
    stats: Stats;
}
 
export interface PathEntryStream {
    read(): PathEntry | null;
}
 
export type CopyFilterSync = (src: string, dest: string) => boolean;
export type CopyFilterAsync = (src: string, dest: string) => Promise<boolean>;
 
export type SymlinkType = 'dir' | 'file' | 'junction';
 
export type Mode = string | number;
 
export type ArrayBufferView = NodeJS.TypedArray | DataView;
 
export interface CopyOptions {
    dereference?: boolean | undefined;
    overwrite?: boolean | undefined;
    preserveTimestamps?: boolean | undefined;
    errorOnExist?: boolean | undefined;
    filter?: CopyFilterSync | CopyFilterAsync | undefined;
    recursive?: boolean | undefined;
}
 
export interface CopyOptionsSync extends CopyOptions {
    filter?: CopyFilterSync | undefined;
}
 
export interface EnsureOptions {
    mode?: number | undefined;
}
 
export interface MoveOptions {
    overwrite?: boolean | undefined;
    limit?: number | undefined;
}
 
export interface ReadOptions {
    throws?: boolean | undefined;
    fs?: object | undefined;
    reviver?: any;
    encoding?: BufferEncoding | string | undefined;
    flag?: string | undefined;
}
 
export interface WriteFileOptions {
    encoding?: BufferEncoding | string | null | undefined;
    flag?: string | undefined;
    mode?: number | undefined;
}
 
export interface WriteOptions extends WriteFileOptions {
    fs?: object | undefined;
    replacer?: any;
    spaces?: number | string | undefined;
    EOL?: string | undefined;
}
 
export interface WritevResult {
    bytesWritten: number;
    buffers: ArrayBufferView[];
}