UNPKG

fast-extract

Version:

Extract contents from various archive types (tar, tar.bz2, tar.gz, tar.xz, tgz, zip)

18 lines (17 loc) 844 B
import { Writable } from 'extract-base-iterator'; type Callback = (error?: Error | null) => void; type WriteFn = (this: FlushWriteStream, chunk: any, encoding: BufferEncoding, callback: Callback) => void; type FlushFn = (callback: Callback) => void; declare class FlushWriteStream extends Writable { destroyed: boolean; pathMade?: boolean; private _writeFn; private _flushFn; constructor(opts: object | undefined, writeFn: WriteFn, flushFn?: FlushFn); _write(chunk: any, enc: BufferEncoding, cb: Callback): void; end(chunk?: any, enc?: any, cb?: Callback): this; destroy(err?: Error): this; } export default function flushWriteStream(writeFn: WriteFn, flushFn?: FlushFn): FlushWriteStream; export default function flushWriteStream(opts: object, writeFn: WriteFn, flushFn?: FlushFn): FlushWriteStream; export {};