Microsoft/TypeScript
GitHub ã§èŠãComment like jsx text emitted twice when preserve enabled
Open
#61,860 opened on 2025幎6æ13æ¥
BugDomain: JSX/TSXHelp Wanted
Repository metrics
- Stars
- Â (48,455 stars)
- PR merge metrics
-  (å¹³åããŒãž 6d 17h) (30d ã§ 9 merged PRs)
説æ
ð Search Terms
comment like jsx text, preserve jsx
ð Version & Regression Information
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about _________
⯠Playground Link
ð» Code
function App() {}
const jsx = <App>/* no */{/* 1 */ 123 /* 2 */}/* no */</App>;
ð Actual behavior
These duplicate sections will be rendered in the JSX text output:
"use strict";
function App() { }
const jsx = <App> /* no *//* no */{/* 1 */123 /* 2 */} /* no *//* no */</App>
// ~~~~~~~ ~~~~~~~
ð Expected behavior
"use strict";
function App() { }
- const jsx = <App> /* no *//* no */{/* 1 */123 /* 2 */} /* no *//* no */</App>
+ const jsx = <App> /* no */{/* 1 */123 /* 2 */} /* no */</App>
Additional information about the issue
No response