🔎 Search Terms
JSX, spread, React.createElement
🕗 Version & Regression Information
Issue is first seen in 5.1.6, and forward to 5.2.2 and the current nightly version.
⏯ Playground Link
https://www.typescriptlang.org/play?target=5&ts=5.2.2#code/DwYQ9gtgDgBATgSwOYAsAuBeA3sAJggNwD4APYAen2IF8YsA6RrGAdzjADskAuGPQ0hSpFq1ckQCwAKCA
💻 Code
<Compright={<div>x</div>}{...{wrong: <div>x</div>}}/>🙁 Actual behavior
React.createElement(Comp,{right: React.createElement("div",null,"x"),wrong: <div>x</div>});🙂 Expected behavior
React.createElement(Comp,{right: React.createElement("div",null,"x"),wrong: React.createElement("div",null,"x")});Additional information about the issue
The same bug seems to have been fixed in #54425, but only when the target is ES2017 or below. When target is set to ES2018 or above the issue still exists.
🔎 Search Terms
JSX, spread, React.createElement
🕗 Version & Regression Information
Issue is first seen in
5.1.6, and forward to5.2.2and the current nightly version.⏯ Playground Link
https://www.typescriptlang.org/play?target=5&ts=5.2.2#code/DwYQ9gtgDgBATgSwOYAsAuBeA3sAJggNwD4APYAen2IF8YsA6RrGAdzjADskAuGPQ0hSpFq1ckQCwAKCA
💻 Code
🙁 Actual behavior
🙂 Expected behavior
Additional information about the issue
The same bug seems to have been fixed in #54425, but only when the target is
ES2017or below. When target is set toES2018or above the issue still exists.