(msg: string, extra: Record<string, unknown> = {})
| 17 | } |
| 18 | |
| 19 | function createServerMessage(msg: string, extra: Record<string, unknown> = {}) { |
| 20 | return JSON.stringify({ |
| 21 | type: "server", |
| 22 | msg, |
| 23 | ...extra, |
| 24 | }); |
| 25 | } |
| 26 | |
| 27 | function errorMessage(error: unknown): string { |
| 28 | if (error instanceof Error) { |
no outgoing calls
no test coverage detected