MockTypedInteraction interface

Module @runic-artifex/views/mock in @runic-artifex/views 0.23.0

interface MockTypedInteraction<TInput, TOutput>

An interaction that the producer asks the browser to handle.

Properties

handled

readonly handled: boolean;

Whether an open client presentation currently handles it.

Methods

request

request(input: TInput, options?: MockInteractionOptions): Promise<{
    readonly kind: "answered";
    readonly output: TOutput;
} | {
    readonly kind: "cancelled" | "failed" | "unhandled";
}>;

Sends a request to the client's handler and resolves with its reply.