File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -22417,10 +22417,13 @@ namespace ts {
22417
22417
propagationType = savePropagationType;
22418
22418
return;
22419
22419
}
22420
- if (source.aliasSymbol && source.aliasTypeArguments && source.aliasSymbol === target.aliasSymbol) {
22421
- // Source and target are types originating in the same generic type alias declaration.
22422
- // Simply infer from source type arguments to target type arguments.
22423
- inferFromTypeArguments(source.aliasTypeArguments, target.aliasTypeArguments!, getAliasVariances(source.aliasSymbol));
22420
+ if (source.aliasSymbol && source.aliasSymbol === target.aliasSymbol) {
22421
+ if (source.aliasTypeArguments) {
22422
+ // Source and target are types originating in the same generic type alias declaration.
22423
+ // Simply infer from source type arguments to target type arguments.
22424
+ inferFromTypeArguments(source.aliasTypeArguments, target.aliasTypeArguments!, getAliasVariances(source.aliasSymbol));
22425
+ }
22426
+ // And if there weren't any type arguments, there's no reason to run inference as the types must be the same.
22424
22427
return;
22425
22428
}
22426
22429
if (source === target && source.flags & TypeFlags.UnionOrIntersection) {
You can’t perform that action at this time.
0 commit comments