···22Run the pwa+server with:
2324#+BEGIN_SRC bash
25- $ pnpm install
26- $ pnpm run dev # lots of stuff concurrently with wireit
27#+END_SRC
2829- Common
···22Run the pwa+server with:
2324#+BEGIN_SRC bash
25+ $ npm install
26+ $ npm run dev # lots of stuff concurrently with wireit
27#+END_SRC
2829- Common
···910import {parseJson} from './protocol'
1112-/** send some data in json format down the wire */
13-export function sendSocket(ws: WebSocket, data: unknown): void {
14- ws.send(JSON.stringify(data))
15-}
16-17/**
18 * given a websocket, wait and take a single message off and return it
19 *
···910import {parseJson} from './protocol'
110000012/**
13 * given a websocket, wait and take a single message off and return it
14 *
+1
src/common/types.ts
···0
···1+export type Replace<K extends keyof U, U, V> = Omit<U, K> & Record<K, V>