import type { Coroutine, Operation, Scope } from "./types.js"; import type { Maybe } from "./maybe.js"; import type { Result } from "./result.js"; export type StepType = "next" | "return" | "throw" | "drop"; export interface CoroutineOptions { scope: Scope; operation(): Operation; } export declare function createCoroutine({ operation, scope }: CoroutineOptions): Coroutine; export declare function useCoroutine(): Operation; export interface Settleware { (outcome: Maybe>, next: (outcome: Maybe>) => void): void; } export declare const SettleContext: import("./types.js").Context; export declare function critical(operation: () => Operation): Operation;