add GoGetSession method binding

This commit is contained in:
cyber-dream 2022-10-28 18:24:08 +03:00
parent 19a7db3137
commit c5503ef282

View File

@ -1,7 +1,9 @@
import { Game } from '../interfaces/game.interface';
import { Session } from '../interfaces/session.interface';
export interface Go extends Window {
GetGames: () => Promise<Game[]>;
GoGetGames: () => Promise<Game[]>;
GoGetSessions: () => Promise<Session[]>
GoRunGame: (gameId: string) => void;
}
@ -9,7 +11,7 @@ export interface GoCallback extends Window {
SetVersion: (value: string) => void;
}
let { GetGames, GoRunGame } = window as unknown as Go;
let { GoGetGames, GoRunGame, GoGetSessions } = window as unknown as Go;
let { SetVersion } = window as unknown as GoCallback;
let w = window as unknown as GoCallback;
@ -30,4 +32,4 @@ let w = window as unknown as GoCallback;
// document.dispatchEvent(event);
// };
export { GetGames, SetVersion, GoRunGame };
export { GoGetGames, GoGetSessions, SetVersion, GoRunGame };