TypeScript/tests/cases/conformance/classes/awaitAndYieldInProperty.ts

19 lines
399 B
TypeScript
Raw Normal View History

// @target: es2019
// @noTypesAndSymbols: true
async function* test(x: Promise<string>) {
class C {
[await x] = await x;
static [await x] = await x;
[yield 1] = yield 2;
static [yield 3] = yield 4;
}
return class {
[await x] = await x;
static [await x] = await x;
[yield 1] = yield 2;
static [yield 3] = yield 4;
}
}