Files
2025-11-20 15:27:34 -06:00

9 lines
617 B
TypeScript

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