import { Freer } from "./freer"; export declare type F0 = () => Z; export declare type F1 = (a: A) => Z; export declare type F2 = (a: A, b: B) => Z; export declare type F3 = (a: A, b: B, c: C) => Z; export declare type F4 = (a: A, b: B, c: C, d: D) => Z; export declare type F5 = (a: A, b: B, c: C, d: D, e: E) => Z; export declare type IOValue = Call | CallP | ThrowE | CatchE; export declare class Call { fn: Function; args: any[]; type: "call"; constructor(fn: Function, args: any[]); } export declare class CallP { fn: Function; args: any[]; type: "callP"; constructor(fn: Function, args: any[]); } export declare class ThrowE { error: any; type: "throwE"; constructor(error: any); } export declare class CatchE { handler: (error: any) => IO; io: IO; type: "catchE"; constructor(handler: (error: any) => IO, io: IO); } export declare type IO = Freer, A>; export declare const IO: typeof Freer; export declare function withEffects(f: F1): (a: A) => IO; export declare function withEffects(f: F2): (a: A, b: B) => IO; export declare function withEffects(f: F3): (a: A, b: B, c: C) => IO; export declare function withEffects(f: F4): (a: A, b: B, c: C, d: D) => IO; export declare function withEffects(f: F5): (a: A, b: B, c: C, d: D, e: E) => IO; export declare function withEffectsP(f: F1>): (a: A) => IO; export declare function withEffectsP(f: F2>): (a: A, b: B) => IO; export declare function withEffectsP(f: F3>): (a: A, b: B, c: C) => IO; export declare function withEffectsP(f: F4>): (a: A, b: B, c: C, d: D) => IO; export declare function withEffectsP(f: F5>): (a: A, b: B, c: C, d: D, e: E) => IO; export declare function call(f: F0): IO; export declare function call(f: F1, a: A): IO; export declare function call(f: F2, a: A, b: B): IO; export declare function call(f: F3, a: A, b: B, c: C): IO; export declare function call(f: F4, a: A, b: B, c: C, d: D): IO; export declare function call(f: F5, a: A, b: B, c: C, d: D, e: E): IO; export declare function callP(f: F0): IO; export declare function callP(f: F1>, a: A): IO; export declare function callP(f: F2>, a: A, b: B): IO; export declare function callP(f: F3>, a: A, b: B, c: C): IO; export declare function callP(f: F4>, a: A, b: B, c: C, d: D): IO; export declare function callP(f: F5>, a: A, b: B, c: C, d: D, e: E): IO; export declare function throwE(error: any): IO; export declare function catchE(errorHandler: (error: any) => IO, io: IO): IO; export declare function doRunIO(e: IO): Promise; export declare function runIO(e: IO): Promise; export declare function testIO(e: IO, arr: any[], a: A): void;