Files
Michess/types/index.d.ts
Nathaniel Tampus 96a262ec29 minor cleanup
2023-03-19 20:43:00 +08:00

20 lines
430 B
TypeScript

export interface Game {
id?: number;
pgn?: string;
white?: User;
black?: User;
winner?: "white" | "black" | "draw";
host?: User;
code?: string;
unlisted?: boolean;
timeout?: number;
observers?: User[];
}
export interface User {
id?: number | string; // string for guest IDs
name?: string | null;
email?: string;
connected?: boolean; // mainly for players, not spectators
}