RpcResolver overview
Added in v1.0.0
Table of contents
combinators
annotateHeaders
Signature
export declare const annotateHeaders: {
(
headers: Headers.Input
): <Req extends Schema.TaggedRequest.All, R>(
self: RequestResolver.RequestResolver<Rpc.Request<Req>, R>
) => RequestResolver.RequestResolver<Rpc.Request<Req>, R>
<Req extends Schema.TaggedRequest.All, R>(
self: RequestResolver.RequestResolver<Rpc.Request<Req>, R>,
headers: Headers.Input
): RequestResolver.RequestResolver<Rpc.Request<Req>, R>
}
Added in v1.0.0
annotateHeadersEffect
Signature
export declare const annotateHeadersEffect: {
<E, R2>(
headers: Effect.Effect<Headers.Input, E, R2>
): <Req extends Schema.TaggedRequest.All, R>(
self: RequestResolver.RequestResolver<Rpc.Request<Req>, R>
) => RequestResolver.RequestResolver<Rpc.Request<Req>, R | R2>
<Req extends Schema.TaggedRequest.All, R, E, R2>(
self: RequestResolver.RequestResolver<Rpc.Request<Req>, R>,
headers: Effect.Effect<Headers.Input, E, R2>
): RequestResolver.RequestResolver<Rpc.Request<Req>, R | R2>
}
Added in v1.0.0
toClient
Signature
export declare const toClient: <
R extends
| RequestResolver.RequestResolver<Rpc.Request<any>, never>
| Effect.Effect<RequestResolver.RequestResolver<Rpc.Request<any>, never>, never, any>
>(
resolver: R,
options?: { readonly spanPrefix?: string }
) => Client<R>
Added in v1.0.0
constructors
make
Signature
export declare const make: <HR, E>(
handler: (u: ReadonlyArray<unknown>) => Stream.Stream<unknown, E, HR>
) => <R extends Router.RpcRouter<any, any>>() => RequestResolver.RequestResolver<
Rpc.Request<Router.RpcRouter.Request<R>>,
Schema.SerializableWithResult.Context<Router.RpcRouter.Request<R>> | HR
>
Added in v1.0.0
models
Client (type alias)
Signature
export type Client<
R extends
| RequestResolver.RequestResolver<Rpc.Request<any>, never>
| Effect.Effect<RequestResolver.RequestResolver<Rpc.Request<any>, never>, never, any>
> =
R extends Effect.Effect<RequestResolver.RequestResolver<Rpc.Request<infer RReq>>, infer _E, infer R>
? <Req extends RReq>(request: Req) => Rpc.Rpc.Result<Req, R>
: R extends RequestResolver.RequestResolver<Rpc.Request<infer RReq>, never>
? <Req extends RReq>(request: Req) => Rpc.Rpc.Result<Req>
: never
Added in v1.0.0