TypeScript/tests/baselines/reference/asyncFunctionDeclaration7_es6.js
2015-06-19 16:01:12 -07:00

18 lines
535 B
TypeScript

//// [asyncFunctionDeclaration7_es6.ts]
async function bar(): Promise<void> {
// 'await' here is an identifier, and not a yield expression.
async function foo(a = await): Promise<void> {
}
}
//// [asyncFunctionDeclaration7_es6.js]
function bar() {
return __awaiter(this, void 0, Promise, function* () {
// 'await' here is an identifier, and not a yield expression.
function foo(a = yield ) {
return __awaiter(this, void 0, Promise, function* () {
});
}
});
}