WaitOptions<C>: {
    collect?: C;
    timeoutMs?: number;
    until?: StopCondition;
}

Type Parameters

Type declaration

  • Optional collect?: C

    Channels whose events land in events. Defaults to none.

  • Optional timeoutMs?: number

    Bounds the wait, in milliseconds. On expiry the promise resolves with $case: 'timedOut'. No default, because a panel can stay open for minutes. Without it, an explorer that opens a panel and then emits no closed leaves the promise pending for the scene's whole life.

  • Optional until?: StopCondition

    Stops the wait early. The panel closing always stops it regardless.