1
0
mirror of https://github.com/thib8956/tic-tac-toe-ws.git synced 2024-09-29 06:06:37 +00:00
tic-tac-toe-ws/common.mts

21 lines
265 B
TypeScript

export type MessageKind = "hello" | "update";
export interface Message {
kind: MessageKind,
data: Response | Hello,
}
export interface Request {
x: number,
y: number
}
export interface Response {
grid: number[]
}
export interface Hello {
id: number
}