chore(getElementType): remove unused logic branches#1396
Conversation
miroslavstastny
left a comment
There was a problem hiding this comment.
👍 on code changes.
But as this functionality goes back to SUIR, it might be useful to hear @levithomason opinion.
Codecov Report
@@ Coverage Diff @@
## master #1396 +/- ##
==========================================
+ Coverage 73.47% 73.49% +0.01%
==========================================
Files 778 778
Lines 5859 5855 -4
Branches 1726 1723 -3
==========================================
- Hits 4305 4303 -2
+ Misses 1548 1546 -2
Partials 6 6
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #1396 +/- ##
==========================================
+ Coverage 73.49% 73.51% +0.01%
==========================================
Files 786 786
Lines 5867 5863 -4
Branches 1706 1723 +17
==========================================
- Hits 4312 4310 -2
+ Misses 1549 1547 -2
Partials 6 6
Continue to review full report at Codecov.
|
This PR removes couple of branches from logic of
getElementTypemethod that infers element type for rendered Stardust component.One of these branches -
getDefault, - wasn't used anywhere, while another one provides unnecessary complication to element type's inference.BREAKING CHANGES
These changes are NOT breaking for clients that are using Typescript, as well as highly likely to introduce no breaking changes to JS clients, given that they are affecting edge-case usages.
The following elements that were originally rendered as
anow will be rendered asasor default element of the corresponding component:Migration path
It is necessary to provide value for
asprop explicitly: