import Bluebird from 'bluebird'; import { Duplex } from 'stream'; declare class FailError extends Error { constructor(message: string); } declare class PrematureEOFError extends Error { missingBytes: number; constructor(howManyMissing: number); } declare class UnexpectedDataError extends Error { unexpected: string; expected: string; constructor(unexpected: string, expected: string); } declare class TimeoutError extends Error { constructor(); } export default class Parser { stream: Duplex; static FailError: typeof FailError; static PrematureEOFError: typeof PrematureEOFError; static UnexpectedDataError: typeof UnexpectedDataError; static TimeoutError: typeof TimeoutError; private ended; constructor(stream: Duplex); end(): Bluebird; raw(): Duplex; readAll(): Bluebird; readAscii(howMany: number): Bluebird; readBytes(howMany: number): Bluebird; readByteFlow(howMany: number, targetStream: Duplex): Bluebird; readError(): Bluebird; readValue(): Bluebird; readUntil(code: number): Bluebird; searchLine(re: RegExp): Bluebird; readLine(): Bluebird; unexpected(data: string, expected: string): Bluebird; } export {}; //# sourceMappingURL=parser.d.ts.map