TypeScript/tests/cases/conformance/emitter/es2015/asyncGenerators/emitter.asyncGenerators.functionExpressions.es2015.ts
2016-12-30 14:10:11 -08:00

29 lines
613 B
TypeScript

// @target: es2015
// @lib: esnext
// @filename: F1.ts
const f1 = async function * () {
}
// @filename: F2.ts
const f2 = async function * () {
const x = yield;
}
// @filename: F3.ts
const f3 = async function * () {
const x = yield 1;
}
// @filename: F4.ts
const f4 = async function * () {
const x = yield* [1];
}
// @filename: F5.ts
const f5 = async function * () {
const x = yield* (async function*() { yield 1; })();
}
// @filename: F6.ts
const f6 = async function * () {
const x = await 1;
}
// @filename: F7.ts
const f7 = async function * () {
return 1;
}