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

    Type Alias BaseEndpointMethodImplementationParams<Endpoint, Method, Context>

    The portion of an endpoint method implementation's parameters that is independent of the runtime environment. Both host (server) implementations and client (mock) implementations include these fields; each side adds its own environment-specific extras on top via EndpointMethodImplementationsBase.

    type BaseEndpointMethodImplementationParams<
        Endpoint extends Readonly<EndpointDefinition>
        | NoParam = NoParam,
        Method extends Readonly<DefinableHttpMethod> | NoParam = NoParam,
        Context = unknown,
    > = {
        context: Context;
        endpointDefinition: Endpoint extends EndpointDefinition
            ? Readonly<Exclude<Endpoint, NoParam>>
            : Readonly<EndpointDefinition>;
        method: Method extends DefinableHttpMethod ? Method : DefinableHttpMethod;
        pathParams: Endpoint extends EndpointDefinition
            ? ExtractPathParams<Endpoint["path"]>
            : ExtractPathParams;
        requestData: EndpointRequestType<Endpoint, Method>;
        requestHeaders: Readonly<Record<string, string | string[] | undefined>>;
        searchParams: NonNullable<
            RouteSearchParamsType<
                ExtractEndpointMethodDefinitionWithNoParam<Endpoint, Method>,
            >,
        >;
    }

    Type Parameters

    Index

    Properties

    context: Context
    endpointDefinition: Endpoint extends EndpointDefinition
        ? Readonly<Exclude<Endpoint, NoParam>>
        : Readonly<EndpointDefinition>
    pathParams: Endpoint extends EndpointDefinition
        ? ExtractPathParams<Endpoint["path"]>
        : ExtractPathParams
    requestHeaders: Readonly<Record<string, string | string[] | undefined>>
    searchParams: NonNullable<
        RouteSearchParamsType<
            ExtractEndpointMethodDefinitionWithNoParam<Endpoint, Method>,
        >,
    >