TypeScript/tests/cases/compiler/es5-asyncFunctionConditionals.ts
2016-06-14 17:59:44 -07:00

16 lines
294 B
TypeScript

// @lib: es5,es2015.promise
// @noEmitHelpers: true
// @target: ES5
declare var x, y, z, a, b, c;
async function conditional0() {
a = (await x) ? y : z;
}
async function conditional1() {
a = x ? await y : z;
}
async function conditional2() {
a = x ? y : await z;
}