server/front/src/Api/Events/ApiGameStateEvent.ts
jonny 3836d5037c game state can be read out by the client APIs
# Conflicts:
#	front/src/Api/IframeListener.ts
#	front/src/Phaser/Game/GameScene.ts
#	front/src/iframe_api.ts
2021-04-21 15:56:52 +02:00

11 lines
No EOL
377 B
TypeScript

import * as tg from "generic-type-guard";
export const isGameStateEvent =
new tg.IsInterface().withProperties({
roomId: tg.isString,
data:tg.isObject
}).get();
/**
* A message sent from the game to the iFrame when a user enters or leaves a zone marked with the "zone" property.
*/
export type GameStateEvent = tg.GuardedType<typeof isGameStateEvent>;