mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-30 01:04:49 -05:00
Count only unit types when counting overlapping keys
This commit is contained in:
@@ -11975,7 +11975,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