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[]