import { SerialPort } from 'serialport'; export type Connection = { end: () => Promise; at: (cmd: string) => Promise; }; export declare const connect: ({ device, delimiter, atHostHexfile, progress, debug, warn, port, inactivityTimeoutInSeconds, onEnd, }: { device: string; atHostHexfile: string; delimiter?: string | undefined; progress?: ((...args: string[]) => void) | undefined; debug?: ((...args: string[]) => void) | undefined; warn?: ((...args: string[]) => void) | undefined; port?: SerialPort | undefined; inactivityTimeoutInSeconds?: number | undefined; onEnd?: ((port: SerialPort, timeout: boolean) => void) | undefined; }) => Promise<{ connection: Connection; deviceLog: string[]; onData: (fn: (s: string) => void) => void; }>;