import { Exit } from "@effect/core/io/Exit/definition";
export declare const EffectURI = "Effect";
export declare type EffectURI = typeof EffectURI;
export declare const _U: unique symbol;
export declare type _U = typeof _U;
export declare const _R: unique symbol;
export declare type _R = typeof _R;
export declare const _E: unique symbol;
export declare type _E = typeof _E;
export declare const _A: unique symbol;
export declare type _A = typeof _A;
export declare const _S1: unique symbol;
export declare type _S1 = typeof _S1;
export declare const _S2: unique symbol;
export declare type _S2 = typeof _S2;
export declare const _W: unique symbol;
export declare type _W = typeof _W;
/**
 * An`Effect<R, E, A>` 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<E, A>
 * ```
 *
 * 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 ets/Effect
 */
export interface Effect<R, E, A> {
    readonly [_U]: EffectURI;
    readonly [_R]: () => R;
    readonly [_E]: () => E;
    readonly [_A]: () => A;
}
/**
 * @tsplus unify ets/Effect
 */
export declare function unifyEffect<X extends Effect<any, any, any>>(self: X): Effect<[
    X
] extends [{
    [_R]: () => infer R;
}] ? R : never, [
    X
] extends [{
    [_E]: () => infer E;
}] ? E : never, [
    X
] extends [{
    [_A]: () => infer A;
}] ? A : never>;
/**
 * @tsplus type ets/Effect/Ops
 */
export interface EffectOps {
    $: EffectAspects;
    Error: {
        new <E, A>(exit: Exit<E, A>, __taPlusTrace?: string): Effect.Error<E, A>;
    };
}
export declare const Effect: EffectOps;
/**
 * @tsplus type ets/Effect/Aspects
 */
export interface EffectAspects {
}
export declare namespace Effect {
    type UIO<A> = Effect<never, never, A>;
    type IO<E, A> = Effect<never, E, A>;
    type RIO<R, A> = Effect<R, never, A>;
    interface Error<E, A> {
        readonly _tag: "EffectError";
        readonly exit: Exit<E, A>;
        readonly trace?: string;
    }
    type Success<T extends Effect<any, any, any>> = [T] extends [Effect<infer R, infer E, infer A>] ? A : never;
}
export declare abstract class Base<R, E, A> implements Effect<R, E, A> {
    readonly [_U]: EffectURI;
    readonly [_R]: () => R;
    readonly [_E]: () => E;
    readonly [_A]: () => A;
    abstract unsafeLog(): string;
}
export declare type Canceler<R> = Effect<R, never, void>;
//# sourceMappingURL=base.d.ts.map