TypeScript/tests/baselines/reference/asyncFunctionDeclaration7_es6.js

18 lines
535 B
TypeScript
Raw Normal View History

2015-05-07 02:33:58 +02:00
//// [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* () {
2015-05-07 02:33:58 +02:00
// 'await' here is an identifier, and not a yield expression.
function foo(a = yield ) {
return __awaiter(this, void 0, Promise, function* () {
2015-06-18 20:31:03 +02:00
});
2015-05-07 02:33:58 +02:00
}
2015-06-18 20:31:03 +02:00
});
2015-05-07 02:33:58 +02:00
}