import { EventEmitter } from 'events';
import IPostMessage from '../IPostMessage';
import ISerialPort from './ISerialPort';
export default class SerialPort implements ISerialPort {
    private refid;
    private eventEmitter;
    private messagePrefix;
    private postMessage;
    /** @internal */
    constructor(refid: string, eventEmitter: EventEmitter, messagePrefix: string, postMessage: IPostMessage<any>);
    onData(listener: (data: Uint8Array) => void): void;
    write(data: string | number[] | Uint8Array): Promise<void>;
    close(): Promise<void>;
    private getMessage;
}
