@@ -5495,7 +5495,7 @@ namespace ts {
5495
5495
prop.checkFlags = templateReadonly || modifiersProp && isReadonlySymbol(modifiersProp) ? CheckFlags.Readonly : 0;
5496
5496
prop.type = propType;
5497
5497
if (propertySymbol) {
5498
- prop.mappedTypeOrigin = propertySymbol;
5498
+ prop.syntheticOrigin = propertySymbol;
5499
5499
}
5500
5500
members.set(propName, prop);
5501
5501
}
@@ -7449,7 +7449,6 @@ namespace ts {
7449
7449
const declarations: Declaration[] = concatenate(leftProp.declarations, rightProp.declarations);
7450
7450
const flags = SymbolFlags.Property | (leftProp.flags & SymbolFlags.Optional);
7451
7451
const result = createSymbol(flags, leftProp.name);
7452
- result.checkFlags = 0;
7453
7452
result.type = getUnionType([getTypeOfSymbol(leftProp), getTypeWithFacts(rightType, TypeFacts.NEUndefined)]);
7454
7453
result.leftSpread = leftProp;
7455
7454
result.rightSpread = rightProp;
@@ -7465,15 +7464,14 @@ namespace ts {
7465
7464
}
7466
7465
7467
7466
function getNonReadonlySymbol(prop: Symbol) {
7468
- if (!(getDeclarationModifierFlagsFromSymbol( prop) & ModifierFlags.Readonly )) {
7467
+ if (!isReadonlySymbol( prop)) {
7469
7468
return prop;
7470
7469
}
7471
- const declarations: Declaration[] = prop.declarations;
7472
7470
const flags = SymbolFlags.Property | (prop.flags & SymbolFlags.Optional);
7473
7471
const result = createSymbol(flags, prop.name);
7474
- result.checkFlags = 0;
7475
7472
result.type = getTypeOfSymbol(prop);
7476
- result.declarations = declarations;
7473
+ result.declarations = prop.declarations;
7474
+ result.syntheticOrigin = prop;
7477
7475
return result;
7478
7476
}
7479
7477
@@ -22140,10 +22138,10 @@ namespace ts {
22140
22138
else if (symbol.flags & SymbolFlags.Transient) {
22141
22139
if ((symbol as SymbolLinks).leftSpread) {
22142
22140
const links = symbol as SymbolLinks;
22143
- return [links.leftSpread, links.rightSpread];
22141
+ return [...getRootSymbols( links.leftSpread), ...getRootSymbols( links.rightSpread) ];
22144
22142
}
22145
- if ((symbol as SymbolLinks).mappedTypeOrigin ) {
22146
- return getRootSymbols((symbol as SymbolLinks).mappedTypeOrigin );
22143
+ if ((symbol as SymbolLinks).syntheticOrigin ) {
22144
+ return getRootSymbols((symbol as SymbolLinks).syntheticOrigin );
22147
22145
}
22148
22146
22149
22147
let target: Symbol;
0 commit comments