Adding event support to items

This commit is contained in:
David Négrier 2020-07-27 22:36:07 +02:00
parent 513244ae1f
commit ee612f6585
11 changed files with 253 additions and 36 deletions

View file

@ -0,0 +1,10 @@
import * as tg from "generic-type-guard";
export const isItemEventMessageInterface =
new tg.IsInterface().withProperties({
itemId: tg.isNumber,
event: tg.isString,
state: tg.isUnknown,
parameters: tg.isUnknown,
}).get();
export type ItemEventMessageInterface = tg.GuardedType<typeof isItemEventMessageInterface>;