add more typescript examples

This commit is contained in:
zekro committed 2026-07-17 10:52:41 +02:00
1 parent 2bc148342d
commit 9e4e019660
2 files changed
+16 -4

No files matched your search

+3 -1
View File
@@ -4,6 +4,8 @@ enum OpCode {
MOVE,
}
type PingEvent = Record<string, never>;
type HelloEvent = {
name: string;
};
@@ -14,7 +16,7 @@ type MoveEvent = {
};
type OpArgsMapping = {
[OpCode.PING]: {};
[OpCode.PING]: PingEvent;
[OpCode.HELLO]: HelloEvent;
[OpCode.MOVE]: MoveEvent;
};