2020-06-09 23:07:19 +02:00
|
|
|
import * as tg from "generic-type-guard";
|
|
|
|
|
|
|
|
/*export interface PointInterface {
|
2020-05-19 19:11:12 +02:00
|
|
|
readonly x: number;
|
|
|
|
readonly y: number;
|
|
|
|
readonly direction: string;
|
2020-06-09 23:07:19 +02:00
|
|
|
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>;
|