import { CanBePromise } from '../typing';
/**
 * Makes synchronous calls as much as possible, otherwise builds a promise of fulfillment.
 * Returns the direct return value if possible otherwise a promise returning the value.
 */
export declare class MaybePromise<T> {
    private returnValue;
    /** Error in synchrone call */
    private syncException;
    get isPromise(): boolean;
    static new<T>(func: () => CanBePromise<T>): MaybePromise<T>;
    private constructor();
    then<TResult>(onfulfilled: (value: T) => CanBePromise<TResult>): MaybePromise<TResult>;
    catch(onrejected: (except: any) => void): MaybePromise<T>;
    done(): CanBePromise<T>;
}
