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