mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 12:51:30 -05:00
Merge pull request #28695 from weswigham/overlappy-count-unit-only
Count only unit types when counting overlapping keys
This commit is contained in:
@@ -11980,7 +11980,7 @@ namespace ts {
|
||||
// Some subset overlap if we have only string literals.
|
||||
// If we have a union of index types, it seems likely that we
|
||||
// needed to elaborate between two generic mapped types anyway.
|
||||
const len = length((overlap as UnionType).types);
|
||||
const len = length(filter((overlap as UnionType).types, isUnitType));
|
||||
if (len >= matchingCount) {
|
||||
bestMatch = target;
|
||||
matchingCount = len;
|
||||
|
||||
Reference in New Issue
Block a user