UNPKG

@bubuzi/serialport

Version:

Node.js package to access serial ports. Linux, OSX and Windows. Welcome your robotic JavaScript overlords. Better yet, program them!

9 lines (8 loc) 613 B
import { ErrorCallback, SerialPortStream, StreamOptions } from '@serialport/stream'; import { AutoDetectTypes, OpenOptionsFromBinding } from '@bubuzi/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); }