···2222Run the pwa+server with:
23232424#+BEGIN_SRC bash
2525- $ pnpm install
2626- $ pnpm run dev # lots of stuff concurrently with wireit
2525+ $ npm install
2626+ $ npm run dev # lots of stuff concurrently with wireit
2727#+END_SRC
28282929- Common
···991010import {parseJson} from './protocol'
11111212-/** send some data in json format down the wire */
1313-export function sendSocket(ws: WebSocket, data: unknown): void {
1414- ws.send(JSON.stringify(data))
1515-}
1616-1712/**
1813 * given a websocket, wait and take a single message off and return it
1914 *
+1
src/common/types.ts
···11+export type Replace<K extends keyof U, U, V> = Omit<U, K> & Record<K, V>