import { Option } from '../option/option';
import { Try } from '../try/try';
/**
* A Future represents a value which may or may not be available. It may be asynchronously filled
* in the future.
*/
declare class Future {
static create(value: Promise | A): Future;
protected promise_: Promise;
protected value_: Option>;
readonly isCompleted: boolean;
readonly promise: Promise;
readonly value: Option>;
protected constructor(promise: Promise);
filter(predicate: (a: A) => boolean): Future;
flatMap(mapper: (a: A) => Future): Future;
foreach(run: (a: A) => B): void;
map(mapper: (a: A) => B): Future;
onComplete(run: (t: Try) => B): void;
recover(this: Future, f: (e: Error) => B): Future;
recoverWith(this: Future, f: (e: Error) => Future): Future;
zip(that: Future): Future<[A, B]>;
}
export { Future };