UNPKG

617 BTypeScriptView Raw
1import { ErrorCallback, SerialPortStream, StreamOptions } from '@serialport/stream';
2import { AutoDetectTypes, OpenOptionsFromBinding } from '@serialport/bindings-cpp';
3export type SerialPortOpenOptions<T extends AutoDetectTypes> = Omit<StreamOptions<T>, 'binding'> & OpenOptionsFromBinding<T>;
4export declare class SerialPort<T extends AutoDetectTypes = AutoDetectTypes> extends SerialPortStream<T> {
5 static list: () => Promise<import("@serialport/bindings-interface").PortInfo[]>;
6 static readonly binding: AutoDetectTypes;
7 constructor(options: SerialPortOpenOptions<T>, openCallback?: ErrorCallback);
8}