Bug Report
๐ Search Terms
generator function union contextual typing yield expression
๐ Version & Regression Information
4.8.4
โฏ Playground Link
Playground link with relevant code

๐ป Code
type Action = () => (Generator<string, string, string[]> | string)
const b: Action = function* () {
// expect `string[]`, actual `never`
const c = yield ''
return ''
}
๐ Actual behavior
never
๐ Expected behavior
string[]