Files
Michess/types/index.ts
Nathaniel Tampus a65202357e add timeout for inactive games
#1
also removed some redundant code
2023-01-16 15:10:53 +08:00

19 lines
356 B
TypeScript

export interface Game {
id?: number;
pgn?: string;
white?: User;
black?: User;
winner?: "white" | "black" | "draw";
host?: User;
code?: string;
open?: boolean;
timeout?: number;
observers?: User[];
}
export interface User {
id?: number | string; // string for guest IDs
name?: string;
email?: string;
}