import { Consumer } from "./frp-common";
import { Behavior } from "./Behavior";
/**
 * A future is a thing that occurs at some point in time with a value.
 * It can be understood as a pair consisting of the time the future
 * occurs and its associated value. It is quite like a JavaScript
 * promise.
 */
export declare abstract class Future<A> implements Consumer<any> {
    occured: boolean;
    value: A;
    protected listeners: Consumer<A>[];
    constructor();
    listen(o: Consumer<A>): void;
    subscribe(f: (a: A) => void): void;
    abstract push(val: any): void;
    resolve(val: A): void;
    map<B>(f: (a: A) => B): Future<B>;
    mapTo<B>(b: B): Future<B>;
    static of<B>(b: B): Future<B>;
    of<B>(b: B): Future<B>;
    static lift<T1, R>(f: (t: T1) => R, m: Future<T1>): Future<R>;
    static lift<T1, T2, R>(f: (t: T1, u: T2) => R, m1: Future<T1>, m2: Future<T2>): Future<R>;
    static lift<T1, T2, T3, R>(f: (t1: T1, t2: T2, t3: T3) => R, m1: Future<T1>, m2: Future<T2>, m3: Future<T3>): Future<R>;
    chain<B>(f: (a: A) => Future<B>): Future<B>;
}
export declare function sink<A>(): Future<A>;
export declare function fromPromise<A>(p: Promise<A>): Future<A>;
/**
 * Create a future from a pushing behavior. The future occurs when the
 * behavior pushes it's next value. Constructing a BehaviorFuture is
 * impure and should not be done direcly.
 * @private
 */
export declare class BehaviorFuture<A> extends Future<A> {
    private b;
    constructor(b: Behavior<A>);
    push(a: A): void;
}
export declare const of: typeof Future.of;
export declare const lift: typeof Future.lift;
