import { Signal, SignalConnection } from 'typed-signals'; import { UserInfo } from 'yawr'; import { GameOptions } from '../shared/standardActions'; export interface IClient { authorize(token: string): Promise; connect(): Promise; reconnect(): Promise; disconnect(): void; getUserInfo(): UserInfo | undefined; call(method: string, ...params: unknown[]): Promise; on(name: string, method: (...args: any[]) => void): SignalConnection; onDisconnected: Signal<(error: any) => void>; onAuthorized: Signal<(error: any) => void>; } export interface IGameRoomClient { client: IClient; gameId?: number; } export interface IDisposableClient { initialize(): Promise; deinitialize(): void; } export interface IBaseComponentClient { type: string; restartGame(options: GameOptions): Promise; }