<Self>(): <
ApiId extends string,
Groups extends HttpApiGroup.Constraint,
const Name extends string
>(
name: Name,
api: HttpApiType.HttpApi<ApiId, Groups>,
config?: Omit<HttpApiClientConfig<ApiId, Groups, Name>, "name">
) => Context.ServiceClass<
Self,
Name,
EffectHttpApiClient.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/internal/httpApiClient.ts:4771 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<
HttpApiClientConfig<ApiId, Groups, Name>,
"name"
>
) => Context.ServiceClass<
Self,
Name,
EffectHttpApiClient.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 httpApiClientService: <Self>() => <
ApiId extends string,
Groups extends HttpApiGroup.Constraint,
Name extends string
>(
name: Name,
api: HttpApiType.HttpApi<ApiId, Groups>,
config?: Omit<
HttpApiClientConfig<ApiId, Groups, Name>,
"name"
>
) => Context.ServiceClass<
Self,
Name,
EffectHttpApiClient.Client<Groups>
> & {
readonly layer: Layer.Layer<
Self,
never,
HttpClient.HttpClient | Scope.Scope
>
}
httpApiClientService;