import type { DurableObject, WorkerEntrypoint } from "cloudflare:workers"; import * as Context from "effect/Context"; import * as Effect from "effect/Effect"; import * as Exit from "effect/Exit"; import * as Layer from "effect/Layer"; import * as Scope from "effect/Scope"; /** * The isolate-lifetime artifacts produced by a single layer build: the built * service Context, the resolved export for this entrypoint, the user's * RPC shape (a thunk — the shape is only populated once `serve` has run), * and the telemetry Layer override registered during init (a thunk for the * same reason). */ export interface WorkerBuild { readonly context: Context.Context; readonly export: Export; readonly shape: () => Record; readonly telemetry: () => Layer.Layer | undefined; } /** * Makes the WorkerEntrypoint class and bridges to Effect fetch and RPC calls. */ export declare const makeWorkerBridge: (Base: typeof WorkerEntrypoint | typeof DurableObject, { stack, entrypoint, }: { stack: { name: string; stage: string; }; entrypoint: any; }) => { new (ctx: any, env: any): { readonly ctx: any; readonly env: any; }; }; export declare const getWorkerExport: ({ entrypoint, stack, exportName, }: { entrypoint: any; stack: { name: string; stage: string; }; exportName: string; }) => { build: (pin: (promise: Promise) => unknown) => Promise>; }; export declare const makeRpcProxy: (self: any, userShape: Effect.Effect, processEvent: (eff: Effect.Effect<[Effect.Effect, Context.Context]>) => Promise) => any; export declare const handleRpcExit: (exit: Exit.Exit, scope?: Scope.Closeable) => Promise; //# sourceMappingURL=WorkerBridge.d.ts.map