TypeScript/tests/cases/conformance/emitter/es2018/forAwait/emitter.forAwait.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

42 lines
858 B
TypeScript

// @target: es2018
// @lib: esnext
// @filename: file1.ts
async function f1() {
let y: any;
for await (const x of y) {
}
}
// @filename: file2.ts
async function f2() {
let x: any, y: any;
for await (x of y) {
}
}
// @filename: file3.ts
async function* f3() {
let y: any;
for await (const x of y) {
}
}
// @filename: file4.ts
async function* f4() {
let x: any, y: any;
for await (x of y) {
}
}
// @filename: file5.ts
// https://github.com/Microsoft/TypeScript/issues/21363
async function f5() {
let y: any;
outer: for await (const x of y) {
continue outer;
}
}
// @filename: file6.ts
// https://github.com/Microsoft/TypeScript/issues/21363
async function* f6() {
let y: any;
outer: for await (const x of y) {
continue outer;
}
}