(direction: "client" | "server", body: string)
| 40 | ) |
| 41 | |
| 42 | const textEvent = (direction: "client" | "server", body: string): WebSocketEvent => ({ |
| 43 | direction, |
| 44 | kind: "text", |
| 45 | body, |
| 46 | }) |
| 47 | |
| 48 | const decodeEvent = (event: WebSocketEvent) => |
| 49 | event.kind === "text" ? event.body : new Uint8Array(Buffer.from(event.body, "base64")) |
no outgoing calls
no test coverage detected