<Self>(): <
ApiId extends string,
Groups extends HttpApiGroup.Constraint,
const Name extends string
>(
name: Name,
api: HttpApiType.HttpApi<ApiId, Groups>,
config?: Omit<HttpApiHyperlinkConfig<ApiId, Groups, Name>, "name">
) => Context.ServiceClass<Self, Name, HttpApiClient.Client<Groups>> & {
readonly layer: Layer.Layer<
Self,
never,
HttpClient.HttpClient | Scope.Scope
>
}Class factory: declare a typed HttpApi client with a baked-in .layer.
constructors
Source src/HttpApiHyperlink.ts:4291 lines
export const const Service: <Self>() => <
ApiId extends string,
Groups extends HttpApiGroup.Constraint,
Name extends string
>(
name: Name,
api: HttpApiType.HttpApi<ApiId, Groups>,
config?: Omit<
HttpApiHyperlinkConfig<ApiId, Groups, Name>,
"name"
>
) => Context.ServiceClass<
Self,
Name,
HttpApiClient.Client<Groups>
> & {
readonly layer: Layer.Layer<
Self,
never,
HttpClient.HttpClient | Scope.Scope
>
}
Class factory: declare a typed HttpApi client with a baked-in .layer.
Service = const httpApiResourceService: <
Self
>() => <
ApiId extends string,
Groups extends HttpApiGroup.Constraint,
Name extends string
>(
name: Name,
api: HttpApiType.HttpApi<ApiId, Groups>,
config?: Omit<
HttpApiHyperlinkConfig<ApiId, Groups, Name>,
"name"
>
) => Context.ServiceClass<
Self,
Name,
HttpApiClient.Client<Groups>
> & {
readonly layer: Layer.Layer<
Self,
never,
HttpClient.HttpClient | Scope.Scope
>
}
httpApiResourceService;