WaitFor beta
TypeAlias of @v12-engine/client
ts
export type WaitFor = {
kind: 'key';
key?: string;
} | {
kind: 'click';
} | {
kind: 'cue';
cue: string;
} | {
kind: 'event';
event: string;
unit?: string;
match?: Record<string, unknown> | ((event: SessionEvent) => boolean);
} | {
kind: 'until';
until: Condition | (() => boolean);
};What a wait waits for: a key (by its code or what it makes; any when left out), a click, a cue of the rules', an event of the game's (its type, and what it must have: unit a ref whose entity is the event's id, or fields that equal), or a condition coming true