@@ -6666,7 +6666,7 @@ namespace ts {
6666
6666
if (isMappedTypeWithKeyofConstraintDeclaration(type)) {
6667
6667
// We have a { [P in keyof T]: X }
6668
6668
for (const prop of getPropertiesOfType(modifiersType)) {
6669
- addMemberForKeyType(getLiteralTypeFromPropertyName(prop, include), /*_index*/ undefined, prop );
6669
+ addMemberForKeyType(getLiteralTypeFromPropertyName(prop, include));
6670
6670
}
6671
6671
if (modifiersType.flags & TypeFlags.Any || getIndexInfoOfType(modifiersType, IndexKind.String)) {
6672
6672
addMemberForKeyType(stringType);
@@ -6685,7 +6685,7 @@ namespace ts {
6685
6685
}
6686
6686
setStructuredTypeMembers(type, members, emptyArray, emptyArray, stringIndexInfo, numberIndexInfo);
6687
6687
6688
- function addMemberForKeyType(t: Type, _index?: number, origin?: Symbol ) {
6688
+ function addMemberForKeyType(t: Type) {
6689
6689
// Create a mapper from T to the current iteration type constituent. Then, if the
6690
6690
// mapped type is itself an instantiated type, combine the iteration mapper with the
6691
6691
// instantiation mapper.
@@ -6707,9 +6707,9 @@ namespace ts {
6707
6707
prop.type = strictNullChecks && isOptional && !isTypeAssignableTo(undefinedType, propType) ? getOptionalType(propType) :
6708
6708
strictNullChecks && !isOptional && modifiersProp && modifiersProp.flags & SymbolFlags.Optional ? getTypeWithFacts(propType, TypeFacts.NEUndefined) :
6709
6709
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;
6713
6713
}
6714
6714
prop.nameType = t;
6715
6715
members.set(propName, prop);
0 commit comments