DefinitelyTyped/types/promise-sequential/promise-sequential-tests.ts
garyking a68b429d53 promise-sequential 1.1: New types (#39410)
* Add new types for module.

* Fix TS version.

* Use new Promise syntax.
2019-10-25 13:27:31 -07:00

14 lines
425 B
TypeScript

import promiseSequential = require('promise-sequential');
const promiseFunctions = [
async (): Promise<string> => new Promise((resolve, reject) => 'a'),
async (): Promise<string> => new Promise((resolve, reject) => 'b'),
async (): Promise<string> => new Promise((resolve, reject) => 'c'),
];
async function main(): Promise<void> {
const result: any[] = await promiseSequential(promiseFunctions);
}
main();