@@ -6666,7 +6666,7 @@ namespace ts {
66666666 if (isMappedTypeWithKeyofConstraintDeclaration(type)) {
66676667 // We have a { [P in keyof T]: X }
66686668 for (const prop of getPropertiesOfType(modifiersType)) {
6669- addMemberForKeyType(getLiteralTypeFromPropertyName(prop, include), /*_index*/ undefined, prop );
6669+ addMemberForKeyType(getLiteralTypeFromPropertyName(prop, include));
66706670 }
66716671 if (modifiersType.flags & TypeFlags.Any || getIndexInfoOfType(modifiersType, IndexKind.String)) {
66726672 addMemberForKeyType(stringType);
@@ -6685,7 +6685,7 @@ namespace ts {
66856685 }
66866686 setStructuredTypeMembers(type, members, emptyArray, emptyArray, stringIndexInfo, numberIndexInfo);
66876687
6688- function addMemberForKeyType(t: Type, _index?: number, origin?: Symbol ) {
6688+ function addMemberForKeyType(t: Type) {
66896689 // Create a mapper from T to the current iteration type constituent. Then, if the
66906690 // mapped type is itself an instantiated type, combine the iteration mapper with the
66916691 // instantiation mapper.
@@ -6707,9 +6707,9 @@ namespace ts {
67076707 prop.type = strictNullChecks && isOptional && !isTypeAssignableTo(undefinedType, propType) ? getOptionalType(propType) :
67086708 strictNullChecks && !isOptional && modifiersProp && modifiersProp.flags & SymbolFlags.Optional ? getTypeWithFacts(propType, TypeFacts.NEUndefined) :
67096709 propType;
6710- if (origin ) {
6711- prop.syntheticOrigin = origin ;
6712- prop.declarations = origin .declarations;
6710+ if (modifiersProp ) {
6711+ prop.syntheticOrigin = modifiersProp ;
6712+ prop.declarations = modifiersProp .declarations;
67136713 }
67146714 prop.nameType = t;
67156715 members.set(propName, prop);
0 commit comments