@@ -6649,7 +6649,7 @@ namespace ts {
66496649 if (isMappedTypeWithKeyofConstraintDeclaration(type)) {
66506650 // We have a { [P in keyof T]: X }
66516651 for (const prop of getPropertiesOfType(modifiersType)) {
6652- addMemberForKeyType(getLiteralTypeFromPropertyName(prop, include), /*_index*/ undefined, prop );
6652+ addMemberForKeyType(getLiteralTypeFromPropertyName(prop, include));
66536653 }
66546654 if (modifiersType.flags & TypeFlags.Any || getIndexInfoOfType(modifiersType, IndexKind.String)) {
66556655 addMemberForKeyType(stringType);
@@ -6668,7 +6668,7 @@ namespace ts {
66686668 }
66696669 setStructuredTypeMembers(type, members, emptyArray, emptyArray, stringIndexInfo, numberIndexInfo);
66706670
6671- function addMemberForKeyType(t: Type, _index?: number, origin?: Symbol ) {
6671+ function addMemberForKeyType(t: Type) {
66726672 // Create a mapper from T to the current iteration type constituent. Then, if the
66736673 // mapped type is itself an instantiated type, combine the iteration mapper with the
66746674 // instantiation mapper.
@@ -6690,9 +6690,9 @@ namespace ts {
66906690 prop.type = strictNullChecks && isOptional && !isTypeAssignableTo(undefinedType, propType) ? getOptionalType(propType) :
66916691 strictNullChecks && !isOptional && modifiersProp && modifiersProp.flags & SymbolFlags.Optional ? getTypeWithFacts(propType, TypeFacts.NEUndefined) :
66926692 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;
66966696 }
66976697 prop.nameType = t;
66986698 members.set(propName, prop);
0 commit comments