UNPKG

1.31 kBTypeScriptView Raw
1/// <reference types="node" />
2/// <reference types="node" />
3import { Writable, Readable } from 'stream';
4import * as fs from 'fs';
5type FSMethods = 'renameSync' | 'ftruncateSync' | 'truncateSync' | 'chownSync' | 'fchownSync' | 'lchownSync' | 'chmodSync' | 'fchmodSync' | 'lchmodSync' | 'statSync' | 'lstatSync' | 'fstatSync' | 'linkSync' | 'symlinkSync' | 'readlinkSync' | 'realpathSync' | 'unlinkSync' | 'rmdirSync' | 'mkdirSync' | 'readdirSync' | 'closeSync' | 'openSync' | 'utimesSync' | 'futimesSync' | 'fsyncSync' | 'writeSync' | 'readSync' | 'readFileSync' | 'writeFileSync' | 'appendFileSync' | 'existsSync' | 'accessSync' | 'createReadStream' | 'createWriteStream' | 'watchFile' | 'unwatchFile' | 'watch' | 'rename' | 'ftruncate' | 'truncate' | 'chown' | 'fchown' | 'lchown' | 'chmod' | 'fchmod' | 'lchmod' | 'stat' | 'lstat' | 'fstat' | 'link' | 'symlink' | 'readlink' | 'realpath' | 'unlink' | 'rmdir' | 'mkdir' | 'readdir' | 'close' | 'open' | 'utimes' | 'futimes' | 'fsync' | 'write' | 'read' | 'readFile' | 'writeFile' | 'appendFile' | 'exists' | 'access';
6type FS = Pick<typeof fs, FSMethods | 'promises'>;
7export interface IFS extends FS {
8 WriteStream: typeof Writable | (new (...args: any[]) => Writable);
9 ReadStream: typeof Readable | (new (...args: any[]) => Readable);
10}
11export {};
12
\No newline at end of file