Omit only class methods from object spreads #13365
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Omit class methods from spreads. Others stay.
Fixes #13148 (though the other half of the bug is addressed by #13288, which fixes the type of
Object.assign
)Previously, all methods were omitted except those from the object literal
that contained the spread. This gets rid of the ugly third argument to
getSpreadType
.It also fixes a bug that arose from removing the spread type late in the
development of object spread; methods from the left-hand-side of a
multi-spread object literal were not removed. The spread type code
normalised spreads so the left-hand is never an object, but that code was
removed.