Skip to content

Commit 891aa24

Browse files
Work correctly on unconstrained types.
1 parent 6ee2f20 commit 891aa24

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/compiler/checker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25345,7 +25345,7 @@ namespace ts {
2534525345
someType(type, isGenericTypeWithUnionConstraint) ||
2534625346
((type.flags & TypeFlags.Instantiable) && contextualType && isEmptyObjectType(contextualType))
2534725347
);
25348-
return substituteConstraints ? mapType(type, t => t.flags & TypeFlags.Instantiable ? getBaseConstraintOrType(t) : t) : type;
25348+
return substituteConstraints ? mapType(type, t => t.flags & TypeFlags.Instantiable ? getBaseConstraintOfType(t) || unknownType : t) : type;
2534925349
}
2535025350

2535125351
function isExportOrExportExpression(location: Node) {

0 commit comments

Comments
 (0)