@sberdevices/assistant-client
Version:
Модуль взаимодействия с виртуальным ассистентом
16 lines • 595 B
TypeScript
import { WSCreator } from '../../typings';
export interface TransportEvents {
connecting: () => void;
ready: () => void;
close: () => void;
error: (error?: Event) => void;
message: (data: Uint8Array) => void;
}
export declare const createTransport: (createWS?: WSCreator) => {
send: (data: Uint8Array) => void;
open: (url: string) => void;
close: () => void;
reconnect: (url: string) => void;
on: <K extends "close" | "ready" | "error" | "message" | "connecting">(event: K, cb: TransportEvents[K]) => () => void;
};
//# sourceMappingURL=transport.d.ts.map