partey_workadventure/pusher/src/Model/Websocket/PointInterface.ts
2021-06-24 10:09:10 +02:00

19 lines
468 B
TypeScript

import * as tg from "generic-type-guard";
/*export interface PointInterface {
readonly x: number;
readonly y: number;
readonly direction: string;
readonly moving: boolean;
}*/
export const isPointInterface = new tg.IsInterface()
.withProperties({
x: tg.isNumber,
y: tg.isNumber,
direction: tg.isString,
moving: tg.isBoolean,
})
.get();
export type PointInterface = tg.GuardedType<typeof isPointInterface>;