import { Transform, TransformCallback } from 'stream';
import type { CreateDebug } from './types';
interface SerialStreamOptions {
    device: string;
    baudrate: number;
    app: {
        on(event: string, cb: (...args: any[]) => void): void;
        emit(event: string, ...args: unknown[]): void;
        emitPropertyValue(name: string, value: unknown): void;
        setProviderStatus(id: string, msg: string): void;
        setProviderError(id: string, msg: string): void;
    };
    providerId: string;
    toStdout?: string | string[];
    maxPendingWrites?: number;
    reconnect?: boolean;
    createDebug?: CreateDebug;
}
export default class SerialStream extends Transform {
    private readonly options;
    private readonly debug;
    private serial;
    private reconnectEnabled;
    private reconnectDelay;
    private isFirstError;
    private readonly maxPendingWrites;
    private reconnectTimeout;
    constructor(options: SerialStreamOptions);
    start(): void;
    end(): this;
    _transform(chunk: Buffer, encoding: BufferEncoding, done: TransformCallback): void;
    private scheduleReconnect;
}
export {};
//# sourceMappingURL=serialport.d.ts.map