mirror of
https://github.com/swc-project/swc.git
synced 2024-12-26 23:27:56 +03:00
13 lines
260 B
TypeScript
13 lines
260 B
TypeScript
// @target: esnext,es2015,es5
|
|
// @lib: esnext
|
|
// @noEmitHelpers: true
|
|
// @noTypesAndSymbols: true
|
|
|
|
// https://github.com/microsoft/TypeScript/issues/37686
|
|
async function* f(a: { b?: number }) {
|
|
let c = a.b ?? 10;
|
|
while (c) {
|
|
yield c--;
|
|
}
|
|
}
|