mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
20 lines
407 B
TypeScript
20 lines
407 B
TypeScript
//// [tests/cases/conformance/enums/awaitAndYield.ts] ////
|
|
|
|
//// [awaitAndYield.ts]
|
|
async function* test(x: Promise<number>) {
|
|
enum E {
|
|
foo = await x,
|
|
baz = yield 1,
|
|
}
|
|
}
|
|
|
|
//// [awaitAndYield.js]
|
|
"use strict";
|
|
async function* test(x) {
|
|
let E;
|
|
(function (E) {
|
|
E[E["foo"] = await x] = "foo";
|
|
E[E["baz"] = yield 1] = "baz";
|
|
})(E || (E = {}));
|
|
}
|