1 | import { Channel, ChannelHandler } from '@storybook/channels';
|
2 | declare type OnError = (message: Event) => void;
|
3 | interface WebsocketTransportArgs {
|
4 | url: string;
|
5 | onError: OnError;
|
6 | }
|
7 | interface CreateChannelArgs {
|
8 | url: string;
|
9 | async: boolean;
|
10 | onError: OnError;
|
11 | }
|
12 | export declare class WebsocketTransport {
|
13 | private socket;
|
14 | private handler;
|
15 | private buffer;
|
16 | private isReady;
|
17 | constructor({ url, onError }: WebsocketTransportArgs);
|
18 | setHandler(handler: ChannelHandler): void;
|
19 | send(event: any): void;
|
20 | private sendLater;
|
21 | private sendNow;
|
22 | private flush;
|
23 | private connect;
|
24 | }
|
25 | export default function createChannel({ url, async, onError }: CreateChannelArgs): Channel;
|
26 | export {};
|