UNPKG

@danidoble/webserial

Version:
41 lines 1.61 kB
import { Core } from 'webserial-core'; import { Vision } from '../commands/jsd/applications/vision'; import { Manifest } from '../commands/jsd/applications/manifest'; import { Licensing } from '../commands/jsd/applications/licensing'; import { BuildPacketResult, JSDConstructorParams, JSDEvents } from '../commands/jsd/types/jsd.types'; type EventCallback<T extends any[]> = (...args: T) => void; export declare class JSD extends Core { #private; private _transport; vision: Vision; manifest: Manifest; licensing: Licensing; private _queue; private _timeoutPacketId; private _runningQueue; _lastApplicationCode: number; constructor({ filters, config_port, no_device, socket, transport, }?: JSDConstructorParams); private afterConnectionSetup; serialSetConnectionConstant(): number[]; send(bytes: Uint8Array, options: { alias?: string; waitResponse?: boolean; timeout?: number; }): Promise<void>; onEvent<K extends keyof JSDEvents>(event: K, callback: EventCallback<JSDEvents[K]>): void; offEvent<K extends keyof JSDEvents>(event: K, callback?: EventCallback<JSDEvents[K]>): void; onceEvent<K extends keyof JSDEvents>(event: K, callback: EventCallback<JSDEvents[K]>): void; get transport(): string; private acknowledge; private ack; _toQueue(data: BuildPacketResult, options?: { alias?: string; timeout?: number; waitResponse?: boolean; }): void; private _runQueue; private _dequeue; serialMessage(raw: Uint8Array): void; } export {}; //# sourceMappingURL=jsd.d.ts.map