///
/**
* The generic types idea was based on the MIT licensed project https://github.com/forbesmyester/stronger-typed-streams
* Originally published by Matt Forrester https://github.com/forbesmyester
* Types improved and additional features implemented by Roberto Sebestyen roberto@sebestyen.ca https://github.com/hiro5id
*/
import * as NodeStream from 'stream';
import { Duplex } from './stream-duplex-typed';
import { Transform } from './stream-transform-typed';
import { Writable } from './stream-writable-typed';
export declare abstract class Readable extends NodeStream.Readable {
'typechecking-field': Out | undefined;
/**
* give this stream a name so that we can easily reference it in logs
* a common implementation would be:
* public readonly name: string = MyClass.name;
*/
abstract readonly name: string;
constructor(opts?: {});
abstract _read(size: number): any;
push(chunk: Out | null, encoding?: BufferEncoding): boolean;
pipe(destination: Duplex, options?: {
end?: boolean;
}): Duplex;
pipe(destination: Transform, options?: {
end?: boolean;
}): Transform;
pipe(destination: Writable, options?: {
end?: boolean;
}): Writable;
/**
* Syntactic sugar to easily add error handlers between pipe stages
* @param func - the error function
*/
err(func: (err: any) => void): Readable;
toPromiseFinish(): Promise;
}