mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-17 21:06:50 -05:00
Remove unnecessary check in getNarrowableTypeForReference (#47953)
* Remove unnecessary check in getNarrowableTypeForReference * Add regression test
This commit is contained in:
@@ -25081,7 +25081,7 @@ namespace ts {
|
||||
const substituteConstraints = !(checkMode && checkMode & CheckMode.Inferential) &&
|
||||
someType(type, isGenericTypeWithUnionConstraint) &&
|
||||
(isConstraintPosition(type, reference) || hasContextualTypeWithNoGenericTypes(reference, checkMode));
|
||||
return substituteConstraints ? mapType(type, t => t.flags & TypeFlags.Instantiable && !isMappedTypeGenericIndexedAccess(t) ? getBaseConstraintOrType(t) : t) : type;
|
||||
return substituteConstraints ? mapType(type, t => t.flags & TypeFlags.Instantiable ? getBaseConstraintOrType(t) : t) : type;
|
||||
}
|
||||
|
||||
function isExportOrExportExpression(location: Node) {
|
||||
|
||||
Reference in New Issue
Block a user