// @target: esnext // @strict: true // @noEmit: true declare function f1(gen: () => Generator): void; f1<0, 0, 1>(function* () { const a = yield 0; return 0; }); declare function f2(gen: () => Generator | AsyncGenerator): void; f2<0, 0, 1>(async function* () { const a = yield 0; return 0; });