@@ -4494,7 +4494,6 @@ namespace ts {
4494
4494
function resolveMappedTypeMembers(type: MappedType) {
4495
4495
const members: SymbolTable = createMap<Symbol>();
4496
4496
let stringIndexInfo: IndexInfo;
4497
- let numberIndexInfo: IndexInfo;
4498
4497
// Resolve upfront such that recursive references see an empty object type.
4499
4498
setStructuredTypeMembers(type, emptySymbols, emptyArray, emptyArray, undefined, undefined);
4500
4499
// In { [P in K]: T }, we refer to P as the type parameter type, K as the constraint type,
@@ -4529,16 +4528,8 @@ namespace ts {
4529
4528
else if (t.flags & TypeFlags.String) {
4530
4529
stringIndexInfo = createIndexInfo(propType, isReadonly);
4531
4530
}
4532
- else if (t.flags & TypeFlags.Number) {
4533
- numberIndexInfo = createIndexInfo(propType, isReadonly);
4534
- }
4535
4531
});
4536
- // If we created both a string and a numeric string index signature, and if the two index
4537
- // signatures have identical types, discard the redundant numeric index signature.
4538
- if (stringIndexInfo && numberIndexInfo && isTypeIdenticalTo(stringIndexInfo.type, numberIndexInfo.type)) {
4539
- numberIndexInfo = undefined;
4540
- }
4541
- setStructuredTypeMembers(type, members, emptyArray, emptyArray, stringIndexInfo, numberIndexInfo);
4532
+ setStructuredTypeMembers(type, members, emptyArray, emptyArray, stringIndexInfo, undefined);
4542
4533
}
4543
4534
4544
4535
function getTypeParameterFromMappedType(type: MappedType) {
0 commit comments