TypeScript/tests/cases/conformance/emitter/es2018/asyncGenerators/emitter.asyncGenerators.objectLiteralMethods.es2018.ts
Kagami Sascha Rosylight 6249b4c704 Remove ES2018 transforms for ES2018 target (#26315)
* rename esnext.ts as es2018.ts

* remove ES2018 transforms for ES2018 target

* change target from esnext to es2018

* rename tests
2019-02-06 15:35:52 -08:00

44 lines
679 B
TypeScript

// @target: es2018
// @lib: esnext
// @filename: O1.ts
const o1 = {
async * f() {
}
}
// @filename: O2.ts
const o2 = {
async * f() {
const x = yield;
}
}
// @filename: O3.ts
const o3 = {
async * f() {
const x = yield 1;
}
}
// @filename: O4.ts
const o4 = {
async * f() {
const x = yield* [1];
}
}
// @filename: O5.ts
const o5 = {
async * f() {
const x = yield* (async function*() { yield 1; })();
}
}
// @filename: O6.ts
const o6 = {
async * f() {
const x = await 1;
}
}
// @filename: O7.ts
const o7 = {
async * f() {
return 1;
}
}