import type * as runtime from "@cloudflare/workers-types"; import * as Effect from "effect/Effect"; import { Worker, WorkerEnvironment } from "../Workers/Worker.ts"; import type { Namespace } from "./Namespace.ts"; import { NamespaceError } from "./NamespaceTypes.ts"; /** * Shared scaffolding for the Worker-binding implementations of the KV * services. * * Resolves the {@link WorkerEnvironment} and host {@link Worker}, registers * the `kv_namespace` binding at deploy time, then delegates to `makeClient` * with the shared {@link makeKVNamespaceHelpers} to build the * read/write/read-write client. */ export declare const makeKVNamespaceBinding: (options: { makeClient: (helpers: ReturnType) => Client; }) => Effect.Effect<(namespace: Namespace) => Effect.Effect, never, WorkerEnvironment | Worker>; /** Primitives shared by the read and write halves of the binding client. */ export declare const makeKVNamespaceHelpers: (env: Record, namespace: Namespace) => { raw: Effect.Effect, never, never>; use: (fn: (raw: runtime.KVNamespace) => Promise) => Effect.Effect; tryPromise: (fn: () => Promise) => Effect.Effect; }; //# sourceMappingURL=NamespaceBinding.d.ts.map