import { Cause } from "@effect/core/io/Cause/definition"; export declare const EffectURI: unique symbol; export type EffectURI = typeof EffectURI; /** * An`Effect` value is an immutable value that lazily describes a * workflow or job. The workflow requires some environment `R`, and may fail * with an error of type `E`, or succeed with a value of type `A`. * * These lazy workflows, referred to as _effects_, can be informally thought of * as functions in the form: * * ```typescript * (environment: R) => Either * ``` * * Effects model resourceful interaction with the outside world, including * synchronous, asynchronous, concurrent, and parallel interaction. * * Effects use a fiber-based concurrency model, with built-in support for * scheduling, fine-grained interruption, structured concurrency, and high * scalability. * * To run an effect, you need a `Runtime`, which is capable of executing * effects. * * @tsplus type effect/core/io/Effect */ export interface Effect { readonly [EffectURI]: { _R: (_: never) => R; _E: (_: never) => E; _A: (_: never) => A; }; } /** * @tsplus unify effect/core/io/Effect */ export declare function unifyEffect>(self: X): Effect<[ X ] extends [{ readonly [EffectURI]: { _R: (_: never) => infer R; }; }] ? R : never, [ X ] extends [{ readonly [EffectURI]: { _E: (_: never) => infer E; }; }] ? E : never, [ X ] extends [{ readonly [EffectURI]: { _A: (_: never) => infer A; }; }] ? A : never>; /** * @tsplus type effect/core/io/Effect.Ops */ export interface EffectOps { readonly $: EffectAspects; readonly Error: { new (cause: Cause): Effect.Error; }; } export declare const Effect: EffectOps; /** * @tsplus type effect/core/io/Effect.Aspects */ export interface EffectAspects { } export declare namespace Effect { interface Error { readonly _tag: "EffectError"; readonly cause: Cause; } type Success> = [T] extends [ Effect ] ? A : never; } export type Canceler = Effect; //# sourceMappingURL=base.d.ts.map