2021-05-12 14:30:12 +02:00
|
|
|
import * as tg from "generic-type-guard";
|
|
|
|
|
2021-06-25 18:14:40 +02:00
|
|
|
export const isSetPropertyEvent = new tg.IsInterface()
|
|
|
|
.withProperties({
|
2021-05-12 14:30:12 +02:00
|
|
|
layerName: tg.isString,
|
|
|
|
propertyName: tg.isString,
|
2021-06-25 18:14:40 +02:00
|
|
|
propertyValue: tg.isUnion(tg.isString, tg.isUnion(tg.isNumber, tg.isUnion(tg.isBoolean, tg.isUndefined))),
|
|
|
|
})
|
|
|
|
.get();
|
2021-05-12 14:30:12 +02:00
|
|
|
/**
|
|
|
|
* A message sent from the iFrame to the game to change the value of the property of the layer
|
|
|
|
*/
|
2021-06-25 18:14:40 +02:00
|
|
|
export type SetPropertyEvent = tg.GuardedType<typeof isSetPropertyEvent>;
|