@@ -3550,9 +3550,6 @@ namespace ts {
3550
3550
if (symbol.flags & SymbolFlags.Instantiated) {
3551
3551
return getTypeOfInstantiatedSymbol(symbol);
3552
3552
}
3553
- if (symbol.flags & SymbolFlags.SyntheticProperty && symbol.syntheticKind === SyntheticSymbolKind.Spread) {
3554
- return getTypeOfSpreadProperty(symbol);
3555
- }
3556
3553
if (symbol.flags & (SymbolFlags.Variable | SymbolFlags.Property)) {
3557
3554
return getTypeOfVariableOrParameterOrProperty(symbol);
3558
3555
}
@@ -3571,14 +3568,6 @@ namespace ts {
3571
3568
return unknownType;
3572
3569
}
3573
3570
3574
- function getTypeOfSpreadProperty(symbol: Symbol) {
3575
- const links = getSymbolLinks(symbol);
3576
- if (!links.type) {
3577
- links.type = getUnionType([getTypeOfSymbol(links.leftSpread), getTypeOfSymbol(links.rightSpread)]);
3578
- }
3579
- return links.type;
3580
- }
3581
-
3582
3571
function getTargetType(type: Type): Type {
3583
3572
return getObjectFlags(type) & ObjectFlags.Reference ? (<TypeReference>type).target : type;
3584
3573
}
@@ -4588,7 +4577,6 @@ namespace ts {
4588
4577
propTypes.push(type);
4589
4578
}
4590
4579
const result = <TransientSymbol>createSymbol(SymbolFlags.Property | SymbolFlags.Transient | SymbolFlags.SyntheticProperty | commonFlags, name);
4591
- result.syntheticKind = SyntheticSymbolKind.UnionOrIntersection;
4592
4580
result.containingType = containingType;
4593
4581
result.hasNonUniformType = hasNonUniformType;
4594
4582
result.isPartial = isPartial;
@@ -5932,9 +5920,9 @@ namespace ts {
5932
5920
const rightProp = members[leftProp.name];
5933
5921
if (rightProp.flags & SymbolFlags.Optional) {
5934
5922
const declarations: Declaration[] = concatenate(leftProp.declarations, rightProp.declarations);
5935
- const flags = SymbolFlags.Property | SymbolFlags.Transient | SymbolFlags.SyntheticProperty | (leftProp.flags & SymbolFlags.Optional);
5923
+ const flags = SymbolFlags.Property | SymbolFlags.Transient | (leftProp.flags & SymbolFlags.Optional);
5936
5924
const result = <TransientSymbol>createSymbol(flags, leftProp.name);
5937
- result.syntheticKind = SyntheticSymbolKind.Spread ;
5925
+ result.type = getUnionType([getTypeOfSymbol(leftProp), getTypeOfSymbol(rightProp)]) ;
5938
5926
result.leftSpread = leftProp;
5939
5927
result.rightSpread = rightProp;
5940
5928
result.declarations = declarations;
@@ -19220,23 +19208,21 @@ namespace ts {
19220
19208
19221
19209
function getRootSymbols(symbol: Symbol): Symbol[] {
19222
19210
if (symbol.flags & SymbolFlags.SyntheticProperty) {
19223
- if (symbol.syntheticKind === SyntheticSymbolKind.Spread) {
19224
- const links = getSymbolLinks(symbol);
19225
- return [links.leftSpread, links.rightSpread];
19226
- }
19227
- else {
19228
- const symbols: Symbol[] = [];
19229
- const name = symbol.name;
19230
- forEach(getSymbolLinks(symbol).containingType.types, t => {
19231
- const symbol = getPropertyOfType(t, name);
19232
- if (symbol) {
19233
- symbols.push(symbol);
19234
- }
19235
- });
19236
- return symbols;
19237
- }
19211
+ const symbols: Symbol[] = [];
19212
+ const name = symbol.name;
19213
+ forEach(getSymbolLinks(symbol).containingType.types, t => {
19214
+ const symbol = getPropertyOfType(t, name);
19215
+ if (symbol) {
19216
+ symbols.push(symbol);
19217
+ }
19218
+ });
19219
+ return symbols;
19238
19220
}
19239
19221
else if (symbol.flags & SymbolFlags.Transient) {
19222
+ if ((symbol as SymbolLinks).leftSpread) {
19223
+ const links = symbol as SymbolLinks;
19224
+ return [links.leftSpread, links.rightSpread];
19225
+ }
19240
19226
let target: Symbol;
19241
19227
let next = symbol;
19242
19228
while (next = getSymbolLinks(next).target) {
0 commit comments