rest-vir - v2.3.5
    Preparing search index...

    Type Alias MockHostFetchOptions<Api, HostContext>

    Options for createMockHostFetch.

    @rest-vir/api

    type MockHostFetchOptions<Api extends Readonly<ApiDefinition>, HostContext> = {
        createHostContext: MockCreateHostContext<HostContext> | undefined;
        endpointImplementations: Readonly<MockHostEndpointMap<Api, HostContext>>;
    }

    Type Parameters

    Index
    createHostContext: MockCreateHostContext<HostContext> | undefined

    Raw mock-host createHostContext callback. The fetch wrapper handles the missing-callback case (treats it as {context: undefined}) and forwards the per-request params for you.

    endpointImplementations: Readonly<MockHostEndpointMap<Api, HostContext>>