import { FiberId } from "@effect/core/io/FiberId/definition";
import { Env } from "@tsplus/stdlib/service/Env";
import { STM } from "@effect/core/stm/STM/definition/base";
import { Lazy } from "@tsplus/stdlib/data/Function";
import { STMBase } from "@effect/core/stm/STM/definition/base";
import type { Journal } from "@effect/core/stm/STM/Journal";
export declare class STMEffect<R, E, A> extends STMBase<R, E, A> {
    readonly f: (journal: Journal, fiberId: FiberId, environment: Env<R>) => A;
    readonly _tag = "STMEffect";
    constructor(f: (journal: Journal, fiberId: FiberId, environment: Env<R>) => A);
}
export declare class STMOnFailure<R, E, E1, A> extends STMBase<R, E1, A> {
    readonly stm: STM<R, E, A>;
    readonly onFailure: (e: E) => STM<R, E1, A>;
    readonly _tag = "STMOnFailure";
    constructor(stm: STM<R, E, A>, onFailure: (e: E) => STM<R, E1, A>);
    apply(a: A): STM<R, E, A>;
}
export declare class STMOnRetry<R, E, A, R1, E1, A1> extends STMBase<R, E, A> {
    readonly stm: STM<R, E, A>;
    readonly onRetry: Lazy<STM<R1, E1, A1>>;
    readonly _tag = "STMOnRetry";
    constructor(stm: STM<R, E, A>, onRetry: Lazy<STM<R1, E1, A1>>);
    apply(a: A): STM<R, E, A>;
}
export declare class STMOnSuccess<R, E, A, B> extends STMBase<R, E, B> {
    readonly stm: STM<R, E, A>;
    readonly apply: (a: A) => STM<R, E, B>;
    readonly _tag = "STMOnSuccess";
    constructor(stm: STM<R, E, A>, apply: (a: A) => STM<R, E, B>);
}
export declare class STMProvide<R0, R, E, A> extends STMBase<R, E, A> {
    readonly stm: STM<R0, E, A>;
    readonly f: (env: Env<R>) => Env<R0>;
    readonly _tag = "STMProvide";
    constructor(stm: STM<R0, E, A>, f: (env: Env<R>) => Env<R0>);
}
export declare class STMSucceedNow<R, E, A> extends STMBase<R, E, A> {
    readonly a: A;
    readonly _tag = "STMSucceedNow";
    constructor(a: A);
}
export declare class STMSucceed<R, E, A> extends STMBase<R, E, A> {
    readonly a: Lazy<A>;
    readonly _tag = "STMSucceed";
    constructor(a: Lazy<A>);
}
/**
 * @tsplus macro remove
 */
export declare function concreteSTM<R, E, A>(_: STM<R, E, A>): asserts _ is STMEffect<R, E, A> | STMOnFailure<R, unknown, E, A> | STMOnSuccess<R, E, unknown, A> | STMOnRetry<R, E, A, unknown, unknown, unknown> | STMSucceed<R, E, A> | STMSucceedNow<R, E, A> | STMProvide<unknown, R, E, A>;
export declare const STMFailExceptionSym: unique symbol;
export declare type STMFailExceptionSym = typeof STMFailExceptionSym;
export declare class STMFailException<E> {
    readonly e: E;
    readonly [STMFailExceptionSym]: STMFailExceptionSym;
    constructor(e: E);
}
/**
 * @tsplus static ets/STM/Ops isFailException
 * @tsplus location "@effect/core/stm/STM/definition/primitives"
 */
export declare function isFailException(u: unknown): u is STMFailException<unknown>;
export declare const STMDieExceptionSym: unique symbol;
export declare type STMDieExceptionSym = typeof STMDieExceptionSym;
export declare class STMDieException<E> {
    readonly e: E;
    readonly [STMDieExceptionSym]: STMDieExceptionSym;
    constructor(e: E);
}
/**
 * @tsplus static ets/STM/Ops isDieException
 * @tsplus location "@effect/core/stm/STM/definition/primitives"
 */
export declare function isDieException(u: unknown): u is STMDieException<unknown>;
export declare const STMInterruptExceptionSym: unique symbol;
export declare type STMInterruptExceptionSym = typeof STMInterruptExceptionSym;
export declare class STMInterruptException {
    readonly fiberId: FiberId;
    readonly [STMInterruptExceptionSym]: STMInterruptExceptionSym;
    constructor(fiberId: FiberId);
}
/**
 * @tsplus static ets/STM/Ops isInterruptException
 * @tsplus location "@effect/core/stm/STM/definition/primitives"
 */
export declare function isInterruptException(u: unknown): u is STMInterruptException;
export declare const STMRetryExceptionSym: unique symbol;
export declare type STMRetryExceptionSym = typeof STMRetryExceptionSym;
export declare class STMRetryException {
    readonly [STMRetryExceptionSym]: STMRetryExceptionSym;
}
/**
 * @tsplus static ets/STM/Ops isRetryException
 * @tsplus location "@effect/core/stm/STM/definition/primitives"
 */
export declare function isRetryException(u: unknown): u is STMRetryException;
//# sourceMappingURL=primitives.d.ts.map