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

    Type Alias ApiImplementation<Api, HostContext>

    Stored shape of an ApiImplementation. endpoints and webSockets are records keyed by route path so the runtime can dispatch incoming requests by path with a single object lookup. Keys are string and the api definition's per-path key union is intentionally not propagated into this type — that's what keeps TypeScript instantiation work flat at large route counts.

    type ApiImplementation<
        Api extends Readonly<ApiDefinition>
        | NoParam = NoParam,
        HostContext = unknown,
    > = {
        definition: IsEqual<Api, NoParam> extends true
            ? Readonly<ApiDefinition>
            : Readonly<Api>;
        implementation: ApiImplementationStored<HostContext>;
    }

    Type Parameters

    Index

    Properties

    definition: IsEqual<Api, NoParam> extends true
        ? Readonly<ApiDefinition>
        : Readonly<Api>