import { ErrorContract, ErrorDefinitions } from "../contracts/errors.mjs"; import { CallbackRequirements, EffectValue } from "./operation.mjs"; import { Context, Effect, Scope } from "effect"; //#region src/modules/effect/api-runtime.d.ts export type EffectApiErrorProjection = (error: unknown) => unknown; export type EffectApiErrorContract = Pick, 'project'>; export type EffectApiHandlerValue = Value | PromiseLike | Effect.Effect; export type EffectApiServices = Context.Context | PromiseLike> | Effect.Effect, unknown, Scope.Scope>; export type ProvidedServices = EffectValue extends Context.Context ? Services : never; export type EffectApiContext = EffectApiHandlerValue>; type KeysOfUnion = Value extends object ? keyof Value : never; export type CheckedContext = Extract>, keyof Ctx> extends never ? unknown : never; export type EffectApiOptions = ([ProvidedServices] extends [never] ? { services?: (ctx: Ctx) => Provider; } : { services: (ctx: Ctx) => Provider; }) & ([KeysOfUnion>] extends [never] ? { context?: (ctx: Ctx) => Added & CheckedContext; } : { context: (ctx: Ctx) => Added & CheckedContext; }) & ({ errors: EffectApiErrorContract; mapError?: never; } | { errors?: never; mapError?: EffectApiErrorProjection; }); export type CheckedApiRequirements = [Exclude>, ProvidedServices | Scope.Scope>] extends [never] ? unknown : never; /** Internal erasure is limited to the registration boundary; public adapters check A/E/R. */ export declare function wrapEffectBuilder(builder: Function, options: { services?: Function; context?: Function; mapError?: EffectApiErrorProjection; errors?: EffectApiErrorContract; }): Function; //#endregion //# sourceMappingURL=api-runtime.d.mts.map