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

    Type Alias EndpointDefinitionWithRequiredCustomProps<CustomProps>

    Variant of EndpointDefinition whose every method requires a customProps field narrowed to the supplied CustomProps generic. Use this from wrapper signatures like defineMyEndpoint<E extends EndpointDefinitionWithRequiredCustomProps<MyCustomProps>>(...) to force every caller to specify customProps with the expected shape.

    type EndpointDefinitionWithRequiredCustomProps<
        CustomProps extends UnknownObject,
    > = {
        path: BaseRoutePath;
        requests: RequireAtLeastOne<
            {
                [Method in DefinableHttpMethod]: EndpointMethodDefinitionWithRequiredCustomProps<
                    Method,
                    CustomProps,
                >
            },
        >;
    }

    Type Parameters

    • CustomProps extends UnknownObject
    Index

    Properties

    Properties

    requests: RequireAtLeastOne<
        {
            [Method in DefinableHttpMethod]: EndpointMethodDefinitionWithRequiredCustomProps<
                Method,
                CustomProps,
            >
        },
    >