import { _A, _E, _R } from "@effect-ts/core/Effect"; import * as Ex from "@effect-ts/core/Effect/Exit"; import * as E from "@effect-ts/core/Either"; import * as C from "@effect-ts/system/Cause"; import type { DataSourceAspect } from "../../DataSourceAspect/index.js"; import * as BRS from "../BlockedRequests/index.js"; import type { Continue } from "../Continue/index.js"; declare class Blocked { readonly blockedRequests: BRS.BlockedRequests; readonly cont: Continue; readonly _tag = "Blocked"; readonly [_R]: (r: R) => never; readonly [_E]: () => E; readonly [_A]: () => A; constructor(blockedRequests: BRS.BlockedRequests, cont: Continue); } declare class Done { readonly value: A; readonly _tag = "Done"; readonly [_A]: () => A; constructor(value: A); } declare class Fail { readonly cause: C.Cause; readonly _tag = "Fail"; readonly [_E]: () => E; constructor(cause: C.Cause); } export declare type Result = Blocked | Done | Fail; /** * Folds over the successful or failed result. */ export declare function fold(failure: (e: E) => B, success: (a: A) => B): (fa: Result) => Result; /** * Maps the specified function over the successful value of this result. */ export declare function map(f: (a: A) => B): (self: Result) => Result; /** * Transforms all data sources with the specified data source aspect. */ export declare function mapDataSources(f: DataSourceAspect): (self: Result) => Result; /** * Maps the specified function over the failed value of this result. */ export declare function mapError(f: (a: E) => E1): (self: Result) => Result; /** * Constructs a result that is blocked on the specified requests with the * specified continuation. */ export declare function blocked(blockedRequests: BRS.BlockedRequests, cont: Continue): Result; /** * Constructs a result that is done with the specified value. */ export declare function done(value: A): Result; /** * Constructs a result that is failed with the specified `Cause`. */ export declare function fail(cause: C.Cause): Result; /** * Lifts an `Either` into a result. */ export declare function fromEither(either: E.Either): Result; /** * Lifts an `Exit` into a result. */ export declare function fromExit(exit: Ex.Exit): Result; /** * Provides this result with part of its required environment. */ export declare function provideSome(description: string, f: (r: R0) => R): (self: Result) => Result; export {}; //# sourceMappingURL=index.d.ts.map