typeorm
Version:
Data-Mapper ORM for TypeScript, ES7, ES6, ES5. Supports MySQL, PostgreSQL, MariaDB, SQLite, MS SQL Server, Oracle, WebSQL, MongoDB databases.
16 lines (15 loc) • 657 B
TypeScript
/**
* Utils to help to work with Promise objects.
*/
export declare class PromiseUtils {
/**
* Runs given callback that returns promise for each item in the given collection in order.
* Operations executed after each other, right after previous promise being resolved.
*/
static runInSequence<T, U>(collection: T[], callback: (item: T) => Promise<U>): Promise<U[]>;
/**
* Returns a promise that is fulfilled with an array of promise state snapshots,
* but only after all the original promises have settled, i.e. become either fulfilled or rejected.
*/
static settle(promises: Promise<any>[]): Promise<any>;
}