import { Equals } from "@tsplus/stdlib/structure/Equals";
import { Hash } from "@tsplus/stdlib/structure/Hash";
import { Eval } from "@tsplus/stdlib/io/Eval/definition";
import { Trace } from "@effect/core/io/Trace/definition";
import { FiberId } from "@effect/core/io/FiberId/definition";
import { Stack } from "@tsplus/stdlib/data/Stack";
import { List } from "@tsplus/stdlib/collections/List/definition";
import { HashSet } from "@tsplus/stdlib/collections/HashSet/definition";
import { Tuple } from "@tsplus/stdlib/data/Tuple/definition";
export declare const CauseSym: unique symbol;
export declare type CauseSym = typeof CauseSym;
export declare const _E: unique symbol;
export declare type _E = typeof _E;
/**
 * @tsplus type ets/Cause
 */
export interface Cause<E> extends Equals {
    readonly [CauseSym]: CauseSym;
    readonly [_E]: () => E;
}
/**
 * @tsplus type ets/Cause/Ops
 */
export interface CauseOps {
    $: CauseAspects;
}
export declare const Cause: CauseOps;
/**
 * @tsplus type ets/Cause/Aspects
 */
export interface CauseAspects {
}
/**
 * @tsplus unify ets/Cause
 */
export declare function unify<X extends Cause<any>>(self: X): Cause<[X] extends [Cause<infer CX>] ? CX : never>;
export declare type RealCause<E> = Empty | Fail<E> | Die | Interrupt | Stackless<E> | Then<E> | Both<E>;
/**
 * @tsplus macro remove
 */
export declare function realCause<E>(cause: Cause<E>): asserts cause is RealCause<E>;
/**
 * @tsplus fluent ets/Cause isEmptyType
 * @tsplus location "@effect/core/io/Cause/definition"
 */
export declare function isEmptyType<E>(cause: Cause<E>): cause is Empty;
/**
 * @tsplus fluent ets/Cause isDieType
 * @tsplus location "@effect/core/io/Cause/definition"
 */
export declare function isDieType<E>(cause: Cause<E>): cause is Die;
/**
 * @tsplus fluent ets/Cause isFailType
 * @tsplus location "@effect/core/io/Cause/definition"
 */
export declare function isFailType<E>(cause: Cause<E>): cause is Fail<E>;
/**
 * @tsplus fluent ets/Cause isInterruptType
 * @tsplus location "@effect/core/io/Cause/definition"
 */
export declare function isInterruptType<E>(cause: Cause<E>): cause is Interrupt;
/**
 * @tsplus fluent ets/Cause isStacklessType
 * @tsplus location "@effect/core/io/Cause/definition"
 */
export declare function isStacklessType<E>(cause: Cause<E>): cause is Stackless<E>;
/**
 * @tsplus fluent ets/Cause isThenType
 * @tsplus location "@effect/core/io/Cause/definition"
 */
export declare function isThenType<E>(cause: Cause<E>): cause is Then<E>;
/**
 * @tsplus fluent ets/Cause isBothType
 * @tsplus location "@effect/core/io/Cause/definition"
 */
export declare function isBothType<E>(cause: Cause<E>): cause is Both<E>;
export declare class Empty implements Cause<never>, Equals {
    readonly _tag = "Empty";
    readonly [CauseSym]: CauseSym;
    readonly [_E]: () => never;
    [Hash.sym](): number;
    [Equals.sym](that: unknown): boolean;
    __equalsSafe(that: Cause<unknown>): Eval<boolean>;
}
export interface Fail<E> extends Cause<E> {
}
export declare class Fail<E> implements Cause<E>, Equals {
    readonly value: E;
    readonly trace: Trace;
    readonly _tag = "Fail";
    readonly [CauseSym]: CauseSym;
    readonly [_E]: () => E;
    constructor(value: E, trace: Trace);
    [Hash.sym](): number;
    [Equals.sym](that: unknown): boolean;
    __equalsSafe(that: Cause<unknown>): Eval<boolean>;
}
export declare class Die implements Cause<never>, Equals {
    readonly value: unknown;
    readonly trace: Trace;
    readonly _tag = "Die";
    readonly [CauseSym]: CauseSym;
    readonly [_E]: () => never;
    constructor(value: unknown, trace: Trace);
    [Hash.sym](): number;
    [Equals.sym](that: unknown): boolean;
    __equalsSafe(that: Cause<unknown>): Eval<boolean>;
}
export declare class Interrupt implements Cause<never>, Equals {
    readonly fiberId: FiberId;
    readonly trace: Trace;
    readonly _tag = "Interrupt";
    readonly [CauseSym]: CauseSym;
    readonly [_E]: () => never;
    constructor(fiberId: FiberId, trace: Trace);
    [Hash.sym](): number;
    [Equals.sym](that: unknown): boolean;
    __equalsSafe(that: Cause<unknown>): Eval<boolean>;
}
export declare class Stackless<E> implements Cause<E>, Equals {
    readonly cause: Cause<E>;
    readonly stackless: boolean;
    readonly _tag = "Stackless";
    readonly [CauseSym]: CauseSym;
    readonly [_E]: () => E;
    constructor(cause: Cause<E>, stackless: boolean);
    [Hash.sym](): number;
    [Equals.sym](that: unknown): boolean;
    __equalsSafe(that: Cause<unknown>): Eval<boolean>;
}
export declare class Then<E> implements Cause<E>, Equals {
    readonly left: Cause<E>;
    readonly right: Cause<E>;
    readonly _tag = "Then";
    readonly [CauseSym]: CauseSym;
    readonly [_E]: () => E;
    constructor(left: Cause<E>, right: Cause<E>);
    [Hash.sym](): number;
    [Equals.sym](that: unknown): boolean;
    __equalsSafe(that: Cause<unknown>): Eval<boolean>;
    private eq;
}
export declare class Both<E> implements Cause<E>, Equals {
    readonly left: Cause<E>;
    readonly right: Cause<E>;
    readonly _tag = "Both";
    readonly [CauseSym]: CauseSym;
    readonly [_E]: () => E;
    constructor(left: Cause<E>, right: Cause<E>);
    [Hash.sym](): number;
    [Equals.sym](that: unknown): boolean;
    __equalsSafe(that: Cause<unknown>): Eval<boolean>;
    private eq;
}
/**
 * @tsplus static ets/Cause/Ops empty
 * @tsplus location "@effect/core/io/Cause/definition"
 */
export declare const empty: Cause<never>;
/**
 * @tsplus static ets/Cause/Ops die
 * @tsplus location "@effect/core/io/Cause/definition"
 */
export declare function die(defect: unknown, trace?: Trace): Cause<never>;
/**
 * @tsplus static ets/Cause/Ops fail
 * @tsplus location "@effect/core/io/Cause/definition"
 */
export declare function fail<E>(error: E, trace?: Trace): Cause<E>;
/**
 * @tsplus static ets/Cause/Ops interrupt
 * @tsplus location "@effect/core/io/Cause/definition"
 */
export declare function interrupt(fiberId: FiberId, trace?: Trace): Cause<never>;
/**
 * @tsplus static ets/Cause/Ops stack
 * @tsplus location "@effect/core/io/Cause/definition"
 */
export declare function stack<E>(cause: Cause<E>): Cause<E>;
/**
 * @tsplus static ets/Cause/Ops stackless
 * @tsplus location "@effect/core/io/Cause/definition"
 */
export declare function stackless<E>(cause: Cause<E>): Cause<E>;
/**
 * @tsplus operator ets/Cause +
 * @tsplus static ets/Cause/Ops then
 * @tsplus location "@effect/core/io/Cause/definition"
 */
export declare function combineSeq<E1, E2>(left: Cause<E1>, right: Cause<E2>): Cause<E1 | E2>;
/**
 * @tsplus operator ets/Cause &
 * @tsplus static ets/Cause/Ops both
 * @tsplus location "@effect/core/io/Cause/definition"
 */
export declare function combinePar<E1, E2>(left: Cause<E1>, right: Cause<E2>): Cause<E1 | E2>;
/**
 * Determines if the provided value is a `Cause`.
 * @tsplus fluent ets/Cause isCause
 * @tsplus location "@effect/core/io/Cause/definition"
 */
export declare function isCause(self: unknown): self is Cause<unknown>;
/**
 * Determines if the `Cause` is empty.
 * @tsplus getter ets/Cause isEmpty
 * @tsplus location "@effect/core/io/Cause/definition"
 */
export declare function isEmpty<E>(cause: Cause<E>): boolean;
//# sourceMappingURL=definition.d.ts.map