2020-11-13 18:00:22 +01:00
|
|
|
import * as tg from "generic-type-guard";
|
|
|
|
|
|
|
|
/*export interface PointInterface {
|
|
|
|
readonly x: number;
|
|
|
|
readonly y: number;
|
|
|
|
readonly direction: string;
|
|
|
|
readonly moving: boolean;
|
|
|
|
}*/
|
|
|
|
|
2021-06-24 10:09:10 +02:00
|
|
|
export const isPointInterface = new tg.IsInterface()
|
|
|
|
.withProperties({
|
2020-11-13 18:00:22 +01:00
|
|
|
x: tg.isNumber,
|
|
|
|
y: tg.isNumber,
|
|
|
|
direction: tg.isString,
|
2021-06-24 10:09:10 +02:00
|
|
|
moving: tg.isBoolean,
|
|
|
|
})
|
|
|
|
.get();
|
2020-11-13 18:00:22 +01:00
|
|
|
export type PointInterface = tg.GuardedType<typeof isPointInterface>;
|