We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6dc8072 commit 71e52deCopy full SHA for 71e52de
1 file changed
src/compiler/checker.ts
@@ -15138,7 +15138,7 @@ namespace ts {
15138
}
15139
15140
// Return a union of the return expression types.
15141
- type = getUnionType(yieldTypes ? yieldTypes.concat(types) : types, /*subtypeReduction*/ true);
+ type = getUnionType(types, /*subtypeReduction*/ true);
15142
15143
if (functionFlags & FunctionFlags.Generator) { // AsyncGenerator function or Generator function
15144
type = functionFlags & FunctionFlags.Async
0 commit comments