TypeScript/tests/cases/compiler/correctOrderOfPromiseMethod.ts
Wesley Wigham 25c3b99f29 Add skip lib check to many tests (#18935)
* Add skip lib check to many tests, do not include unit test duration in profiler duration

* Add a few more skipLibCheck flags

* A few more

* Add more skip lib check flags
2017-10-04 13:14:05 -07:00

28 lines
586 B
TypeScript

// @skipLibCheck: true
// @lib: dom, es7
interface A {
id: string
}
interface B {
id: string
fieldB: string
}
async function countEverything(): Promise<number> {
const providerA = async (): Promise<A[]> => { return [] }
const providerB = async (): Promise<B[]> => { return [] }
const [resultA, resultB] = await Promise.all([
providerA(),
providerB(),
]);
const dataA: A[] = resultA;
const dataB: B[] = resultB;
if (dataA && dataB) {
return dataA.length + dataB.length;
}
return 0;
}