import { Equals } from "@tsplus/stdlib/structure/Equals";
import { Hash } from "@tsplus/stdlib/structure/Hash";
import { FiberId } from "@effect/core/io/FiberId/definition";
/**
* @tsplus type effect/core/stm/TExit
*/
export type TExit = Fail | Die | Interrupt | Succeed | Retry;
/**
* @tsplus type effect/core/stm/TExit.Ops
*/
export interface TExitOps {
$: TExitAspects;
}
export declare const TExit: TExitOps;
/**
* @tsplus type effect/core/stm/TExit.Aspects
*/
export interface TExitAspects {
}
/**
* @tsplus unify effect/core/stm/TExit/Fail
* @tsplus unify effect/core/stm/TExit/Die
* @tsplus unify effect/core/stm/TExit/Interrupt
* @tsplus unify effect/core/stm/TExit/Succeed
* @tsplus unify effect/core/stm/TExit/Retry
*/
export declare function unifyTExit>(self: X): TExit<[
X
] extends [{
_E: () => infer E;
}] ? E : never, [
X
] extends [{
_A: () => infer A;
}] ? A : never>;
/**
* @tsplus type effect/core/stm/TExit/Fail
*/
export declare class Fail implements Equals {
readonly value: E;
readonly _tag = "Fail";
readonly _E: () => E;
readonly _A: () => never;
constructor(value: E);
[Hash.sym](): number;
[Equals.sym](that: unknown): boolean;
}
/**
* @tsplus type effect/core/stm/TExit/Die
*/
export declare class Die implements Equals {
readonly value: unknown;
readonly _tag = "Die";
readonly _E: () => never;
readonly _A: () => never;
constructor(value: unknown);
[Hash.sym](): number;
[Equals.sym](that: unknown): boolean;
}
/**
* @tsplus type effect/core/stm/TExit/Interrupt
*/
export declare class Interrupt implements Equals {
readonly fiberId: FiberId;
readonly _tag = "Interrupt";
readonly _E: () => never;
readonly _A: () => never;
constructor(fiberId: FiberId);
[Hash.sym](): number;
[Equals.sym](that: unknown): boolean;
}
/**
* @tsplus type effect/core/stm/TExit/Succeed
*/
export declare class Succeed implements Equals {
readonly value: A;
readonly _tag = "Succeed";
readonly _E: () => never;
readonly _A: () => A;
constructor(value: A);
[Hash.sym](): number;
[Equals.sym](that: unknown): boolean;
}
/**
* @tsplus type effect/core/stm/TExit/Retry
*/
export declare class Retry implements Equals {
readonly _tag = "Retry";
[Hash.sym](): number;
[Equals.sym](that: unknown): boolean;
}
/**
* @tsplus static effect/core/stm/TExit.Ops unit
* @tsplus location "@effect/core/stm/TExit/definition"
*/
export declare const unit: TExit;
/**
* @tsplus static effect/core/stm/TExit.Ops succeed
* @tsplus location "@effect/core/stm/TExit/definition"
*/
export declare function succeed(a: A): TExit;
/**
* @tsplus static effect/core/stm/TExit.Ops fail
* @tsplus location "@effect/core/stm/TExit/definition"
*/
export declare function fail(e: E): TExit;
/**
* @tsplus static effect/core/stm/TExit.Ops die
* @tsplus location "@effect/core/stm/TExit/definition"
*/
export declare function die(e: unknown): TExit;
/**
* @tsplus static effect/core/stm/TExit.Ops interrupt
* @tsplus location "@effect/core/stm/TExit/definition"
*/
export declare function interrupt(fiberId: FiberId): TExit;
/**
* @tsplus static effect/core/stm/TExit.Ops retry
* @tsplus location "@effect/core/stm/TExit/definition"
*/
export declare const retry: TExit;
//# sourceMappingURL=definition.d.ts.map