/// import * as fs from 'fs'; interface ConstructorOptions { cwd?: string; base?: string; path?: string; history?: string[]; stat?: fs.Stats; contents?: Buffer | NodeJS.ReadableStream | null; [customOption: string]: any; } export interface FileConstructor { new (options: ConstructorOptions & { contents: Buffer; }): BufferFile; isVinyl(obj: any): obj is File; isCustomProp(name: string): boolean; prototype: File; } declare let File: FileConstructor; interface File { contents: Buffer | NodeJS.ReadableStream | null; cwd: string; base: string; path: string; readonly history: ReadonlyArray; relative: string; dirname: string; basename: string; stem: string; extname: string; symlink: string | null; stat: fs.Stats | null; [customProperty: string]: any; isBuffer(): this is BufferFile; isStream(): this is StreamFile; isNull(): this is NullFile; isDirectory(): this is DirectoryFile; isSymbolic(): this is SymbolicFile; clone(opts?: { contents?: boolean; deep?: boolean; } | boolean): this; inspect(): string; pipe(stream: T, opts?: { end?: boolean; }): T; } interface BufferFile extends File { contents: Buffer; isStream(): this is never; isBuffer(): true; isNull(): this is never; isDirectory(): this is never; isSymbolic(): this is never; } interface StreamFile extends File { contents: NodeJS.ReadableStream; isStream(): true; isBuffer(): this is never; isNull(): this is never; isDirectory(): this is never; isSymbolic(): this is never; } interface NullFile extends File { contents: null; isStream(): this is never; isBuffer(): this is never; isNull(): true; isDirectory(): this is DirectoryFile; isSymbolic(): this is SymbolicFile; } interface DirectoryFile extends NullFile { isDirectory(): true; isSymbolic(): this is never; } interface SymbolicFile extends NullFile { isDirectory(): this is never; isSymbolic(): true; } export {};