/** * returns a promise that resolves on the next tick */ export declare function nextTick(): Promise; export declare function promiseWait(ms?: number): Promise; export declare function toPromise(maybePromise: Promise | T): Promise; /** * Reusing resolved promises has a better * performance than creating new ones each time. */ export declare const PROMISE_RESOLVE_TRUE: Promise; export declare const PROMISE_RESOLVE_FALSE: Promise; export declare const PROMISE_RESOLVE_NULL: Promise; export declare const PROMISE_RESOLVE_VOID: Promise; export declare function requestIdlePromise(timeout?: number | undefined): Promise; /** * run the callback if requestIdleCallback available * do nothing if not * @link https://developer.mozilla.org/de/docs/Web/API/Window/requestIdleCallback */ export declare function requestIdleCallbackIfAvailable(fun: Function): void; /** * like Promise.all() but runs in series instead of parallel * @link https://github.com/egoist/promise.series/blob/master/index.js * @param tasks array with functions that return a promise */ export declare function promiseSeries(tasks: Function[], initial?: any): Promise;