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

    Type Alias MockHostWebSocketConstructorOptions<HostContext>

    @rest-vir/api

    type MockHostWebSocketConstructorOptions<HostContext> = {
        createHostContext: MockCreateHostContext<HostContext> | undefined;
        webSocketImplementations: Readonly<
            Record<
                string,
                | MockWebSocketListenerImplementations<WebSocketDefinition, HostContext>
                | undefined,
            >,
        >;
    }

    Type Parameters

    • HostContext
    Index
    createHostContext: MockCreateHostContext<HostContext> | undefined

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

    webSocketImplementations: Readonly<
        Record<
            string,
            | MockWebSocketListenerImplementations<WebSocketDefinition, HostContext>
            | undefined,
        >,
    >