@@ -6649,7 +6649,7 @@ namespace ts {
6649
6649
if (isMappedTypeWithKeyofConstraintDeclaration(type)) {
6650
6650
// We have a { [P in keyof T]: X }
6651
6651
for (const prop of getPropertiesOfType(modifiersType)) {
6652
- addMemberForKeyType(getLiteralTypeFromPropertyName(prop, include), /*_index*/ undefined, prop );
6652
+ addMemberForKeyType(getLiteralTypeFromPropertyName(prop, include));
6653
6653
}
6654
6654
if (modifiersType.flags & TypeFlags.Any || getIndexInfoOfType(modifiersType, IndexKind.String)) {
6655
6655
addMemberForKeyType(stringType);
@@ -6668,7 +6668,7 @@ namespace ts {
6668
6668
}
6669
6669
setStructuredTypeMembers(type, members, emptyArray, emptyArray, stringIndexInfo, numberIndexInfo);
6670
6670
6671
- function addMemberForKeyType(t: Type, _index?: number, origin?: Symbol ) {
6671
+ function addMemberForKeyType(t: Type) {
6672
6672
// Create a mapper from T to the current iteration type constituent. Then, if the
6673
6673
// mapped type is itself an instantiated type, combine the iteration mapper with the
6674
6674
// instantiation mapper.
@@ -6690,9 +6690,9 @@ namespace ts {
6690
6690
prop.type = strictNullChecks && isOptional && !isTypeAssignableTo(undefinedType, propType) ? getOptionalType(propType) :
6691
6691
strictNullChecks && !isOptional && modifiersProp && modifiersProp.flags & SymbolFlags.Optional ? getTypeWithFacts(propType, TypeFacts.NEUndefined) :
6692
6692
propType;
6693
- if (origin ) {
6694
- prop.syntheticOrigin = origin ;
6695
- prop.declarations = origin .declarations;
6693
+ if (modifiersProp ) {
6694
+ prop.syntheticOrigin = modifiersProp ;
6695
+ prop.declarations = modifiersProp .declarations;
6696
6696
}
6697
6697
prop.nameType = t;
6698
6698
members.set(propName, prop);
0 commit comments