import { IO } from "jabz/io";
import { Monad } from "jabz/monad";
import { Future } from "./Future";
import { Behavior } from "./Behavior";
/**
 * The Now monad represents a computation that takes place in a given
 * momemt and where the moment will always be now when the computation
 * is run.
 */
export declare abstract class Now<A> implements Monad<A> {
    abstract run(): A;
    of<B>(b: B): Now<B>;
    static of<B>(b: B): Now<B>;
    chain<B>(f: (a: A) => Now<B>): Now<B>;
    flatten<B>(now: Now<Now<A>>): Now<A>;
    map<B>(f: (a: A) => B): Now<B>;
    mapTo<B>(b: B): Now<B>;
    lift<T1, R>(f: (t: T1) => R, m: Now<T1>): Now<R>;
    lift<T1, T2, R>(f: (t: T1, u: T2) => R, m1: Now<T1>, m2: Now<T2>): Now<R>;
    lift<T1, T2, T3, R>(f: (t1: T1, t2: T2, t3: T3) => R, m1: Now<T1>, m2: Now<T2>, m3: Now<T3>): Now<R>;
}
/**
 * Run an asynchronous IO action and return a future in the Now monad
 * that resolves with the eventual result of the IO action once it
 * completes. This function is what allows the Now monad to execute
 * imperative actions in a way that is pure and integrated with FRP.
 */
export declare function async<A>(comp: IO<A>): Now<Future<A>>;
/**
 * Returns the current value of a behavior in the Now monad. This is
 * possible because computations in the Now monad has an associated
 * point in time.
 */
export declare function sample<A>(b: Behavior<A>): Now<A>;
/**
 * Convert a future now computation into a now computation of a
 * future. This function is what allows a Now-computation to reach
 * beyond the current moment that it is running in.
 */
export declare function plan<A>(future: Future<Now<A>>): Now<Future<A>>;
/**
 * Run the given Now-computation. The returned promise resolves once
 * the future that is the result of running the now computation
 * occurs. This is an impure function and should not be used in normal
 * application code.
 */
export declare function runNow<A>(now: Now<Future<A>>): Promise<A>;
