kernl API
    Preparing search index...

    Interface AskQueue<K>

    Questions of one kind, or of several a host draws in one place, waiting to be shown one at a time in arrival order. The one in front is what the host shows.

    interface AskQueue<K extends AskKind> {
        current$: Observable<Ask<K> | undefined>;
        waiting$: Observable<readonly Ask<K>[]>;
        answer(answer: AskAnswer<K>): void;
        current(): Ask<K> | undefined;
        dismissWindow(windowId: string): void;
        enqueue(ask: Ask<K>): Promise<AskAnswer<K>>;
        forWindow(windowId: string): readonly Ask<K>[];
        waiting(): readonly Ask<K>[];
    }

    Type Parameters

    Index
    current$: Observable<Ask<K> | undefined>

    The ask in front, or undefined when nothing waits.

    waiting$: Observable<readonly Ask<K>[]>

    Every waiting ask, the one in front first, as the queue changes.

    • Answer the ask in front; the next one comes forward. Does nothing when nothing waits.

      Parameters

      Returns void

    • Returns Ask<K> | undefined

    • Answer every waiting ask from a window with its refusal: the window was revoked.

      Parameters

      • windowId: string

      Returns void

    • Put an ask in line. Resolves with the person's answer, or with the kind's refusal when its window is revoked or the kernel withdraws it first. A renderer for the kind is this function.

      Parameters

      Returns Promise<AskAnswer<K>>

    • The waiting asks a window raised.

      Parameters

      • windowId: string

      Returns readonly Ask<K>[]

    • Returns readonly Ask<K>[]