import { PromiseUtils } from "https://deno.land/x/typeorm@v0.2.23-rc10/src/util/PromiseUtils.ts";
Utils to help to work with Promise objects.
Static Methods
create(value: any)
Creates a new promise with resolved value used for lazy relations.
extractValue(object: any)
If given value is a promise created by "create" method this method gets its value. If given value is not a promise then given value is returned back.
runInSequence<T, U>(collection: T[], callback: (item: T) => Promise<U>): Promise<U[]>
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.
settle(promises: Promise<any>[])
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.