import type * as cf from "@cloudflare/workers-types"; import * as Effect from "effect/Effect"; import * as Layer from "effect/Layer"; import { RpcClient, RpcSerialization, type Rpc, type RpcGroup } from "effect/unstable/rpc"; import type * as RpcClientError from "effect/unstable/rpc/RpcClientError"; export * from "../../Rpc.ts"; /** * Wrap a Cloudflare service-binding stub (or an `Effect` that resolves * to one — useful when the stub depends on a service like * `WorkerEnvironment` that's only available at *exec* phase) into an * Effect-typed RPC client. * * `Service.fetch`/`Service.connect` are passed through eagerly when the * stub is already resolved; everything else is treated as an RPC method * whose dispatch is deferred until call time, so the user effect runs in * the right runtime layer (which is what `bindWorker` actually wants — * its methods are called at exec, even though it's *defined* at init). */ export declare const makeRpcStub: (stubSource: unknown | Effect.Effect) => Shape; export declare const bindEffectRpc: (namespace: { readonly getByName: (id: string, options?: cf.DurableObjectNamespaceGetDurableObjectOptions) => { readonly fetch: any; }; }, group: RpcGroup.RpcGroup, options?: { /** * Override the rpc serialization layer. Defaults to NDJSON, which * is required when any rpc in the group is a streaming rpc. */ readonly serialization?: Layer.Layer; }) => { readonly getByName: (id: string, options?: cf.DurableObjectNamespaceGetDurableObjectOptions) => Effect.Effect, never, Rpc.MiddlewareClient>; }; //# sourceMappingURL=Rpc.d.ts.map