declare module "ext:core/ops" { export type WebSocketEvent = | { kind: "open"; protocol: string } | { kind: "text"; data: string } | { kind: "binary"; data: Uint8Array } | { kind: "error"; message: string } | { kind: "closing" } | { kind: "close"; clean: boolean; code: number; reason: string }; export function op_ws_create(args: [url: string, protocols: string[], userAgent: string]): number; export function op_ws_send( args: [id: number, text: boolean, bytes: Uint8Array | null], ): Promise; export function op_ws_close(args: [id: number, code: number | null, reason: string | null]): null; export function op_ws_fail(id: number): null; export function op_ws_retire(id: number): null; export function op_ws_wait(id: number): Promise; }