mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-07 08:17:05 +00:00
15 lines
448 B
TypeScript
15 lines
448 B
TypeScript
import pAll = require('p-all');
|
|
|
|
const actions: [() => Promise<string>, () => Promise<string>, () => Promise<void>, () => Promise<number>] = [
|
|
() => Promise.resolve('sindresorhus.com'),
|
|
() => Promise.resolve('ava.li'),
|
|
() => Promise.resolve(),
|
|
() => Promise.resolve(1)
|
|
];
|
|
|
|
pAll(actions, {concurrency: 2}).then(result => {
|
|
const str: string = result[0];
|
|
const str2: string = result[1];
|
|
const num: number = result[3];
|
|
});
|