have a roster and a whoami

This commit is contained in:
Peter Harpending
2026-02-12 20:32:34 -08:00
parent db6d244cb6
commit 08c0119ae0
6 changed files with 102 additions and 17 deletions
+7 -1
View File
@@ -9,7 +9,13 @@
*
* @module
*/
type state = {
whoami: string;
roster: Array<string>;
};
declare let st: state;
declare function main(): Promise<void>;
type ws_msg = ["join", string] | ["down", string];
type ws_msg = ["whoami", string] | ["roster", Array<string>];
declare function handle_ws_msg(message: ws_msg): void;
declare function ws_send_json(ws: WebSocket, x: any): void;
declare function render_state(): void;