=== tests/cases/conformance/generators/generatorYieldContextualType.ts ===
declare function f1<T, R, S>(gen: () => Generator<R, T, S>): void;
>f1 : <T, R, S>(gen: () => Generator<R, T, S>) => void
>gen : () => Generator<R, T, S>

f1<0, 0, 1>(function* () {
>f1<0, 0, 1>(function* () {	const a = yield 0;	return 0;}) : void
>f1 : <T, R, S>(gen: () => Generator<R, T, S>) => void
>function* () {	const a = yield 0;	return 0;} : () => Generator<0, 0, 1>

	const a = yield 0;
>a : 1
>yield 0 : 1
>0 : 0

	return 0;
>0 : 0

});

declare function f2<T, R, S>(gen: () => Generator<R, T, S> | AsyncGenerator<R, T, S>): void;
>f2 : <T, R, S>(gen: () => Generator<R, T, S> | AsyncGenerator<R, T, S>) => void
>gen : () => Generator<R, T, S> | AsyncGenerator<R, T, S>

f2<0, 0, 1>(async function* () {
>f2<0, 0, 1>(async function* () {	const a = yield 0;	return 0;}) : void
>f2 : <T, R, S>(gen: () => Generator<R, T, S> | AsyncGenerator<R, T, S>) => void
>async function* () {	const a = yield 0;	return 0;} : () => AsyncGenerator<0, 0, 1 | undefined>

	const a = yield 0;
>a : 1 | undefined
>yield 0 : 1 | undefined
>0 : 0

	return 0;
>0 : 0

});
