Remove some redundant code in createJsxAttributesTypeFromAttributesProperty
This commit is contained in:
parent
4303a294f9
commit
d36175b1e8
1 changed files with 4 additions and 8 deletions
|
@ -13293,19 +13293,15 @@ namespace ts {
|
|||
if (spread !== emptyObjectType) {
|
||||
if (attributesArray.length > 0) {
|
||||
spread = getSpreadType(spread, createJsxAttributesType(attributes.symbol, attributesTable));
|
||||
attributesArray = [];
|
||||
attributesTable = createMap<Symbol>();
|
||||
}
|
||||
attributesArray = getPropertiesOfType(spread);
|
||||
}
|
||||
|
||||
attributesTable = createMap<Symbol>();
|
||||
if (attributesArray) {
|
||||
forEach(attributesArray, (attr) => {
|
||||
if (!filter || filter(attr)) {
|
||||
attributesTable.set(attr.name, attr);
|
||||
}
|
||||
});
|
||||
for (const attr of attributesArray) {
|
||||
if (!filter || filter(attr)) {
|
||||
attributesTable.set(attr.name, attr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue