2026-08-26 16:51:46 +07:00
|
|
|
import type { WsEventType, WsStatus } from "./ws/types";
|
2026-07-27 21:54:31 +07:00
|
|
|
|
|
|
|
|
export type WsHook = {
|
2026-08-26 16:51:46 +07:00
|
|
|
status?: WsStatus;
|
2026-07-27 21:54:31 +07:00
|
|
|
on: <E extends WsEventType>(
|
|
|
|
|
eventType: E,
|
|
|
|
|
handler: (data: unknown) => void,
|
|
|
|
|
) => () => void;
|
2026-08-18 10:21:08 +07:00
|
|
|
sendText: (text: string) => void;
|
2026-07-27 21:54:31 +07:00
|
|
|
};
|