11 lines
247 B
TypeScript
11 lines
247 B
TypeScript
import type { WsEventType, WsStatus } from "./ws/types";
|
|
|
|
export type WsHook = {
|
|
status?: WsStatus;
|
|
on: <E extends WsEventType>(
|
|
eventType: E,
|
|
handler: (data: unknown) => void,
|
|
) => () => void;
|
|
sendText: (text: string) => void;
|
|
};
|