/// import SerialPort from 'serialport'; import WebSocket from 'ws'; import { Device } from './messages'; import * as Stream from 'stream'; export declare class WebSocketSerialPort extends Stream.Duplex implements SerialPort { private client; readonly path: string; readonly baudRate: number; isOpen: boolean; binding: any; private responseListener; constructor(client: WebSocket, path: string, baudRate: number); write(data: string | number[] | Buffer, callback?: (error: any, bytesWritten: number) => void): boolean; write(data: string | number[] | Buffer, encoding?: 'ascii' | 'utf8' | 'utf16le' | 'ucs2' | 'base64' | 'binary' | 'hex', callback?: (error: any, bytesWritten: number) => void): boolean; open(callback?: SerialPort.ErrorCallback): Promise; close(callback?: (error: Error) => void): Promise; update(): void; read(): null; set(): void; get(): void; flush(): void; drain(): void; pause(): this; resume(): this; } export declare function createClient(address: string): { listPorts: () => Promise; openPort: (port: string, options: { autoOpen?: boolean | undefined; baudRate: number; }) => Promise; };