Problem description:
I was in a TSX file, created an arrow function, and added a Type Parameter T
(shown below)
And the syntax highlighting got ripped to pieces
It seems to be parsing them as JSX instead of default Typescript.
Expected behavior:
Syntax Highlighting should not detect and highlight Type Parameters as JSX in TSX files
Steps to reproduce:
- Create a Typescript Repl
- Make sure LSP works
- Create a tsx file
- Create a react component and return some basic JSX (an empty div would work)
- Within the component, define an arrow function with type parameters
const testFunction = <T = any>(asdf: string) => asdf;
- Syntax highlighting will break.
Bug appears at this link:
Any Repl.
Reproduced in https://replit.com/@IroncladDev/VultangDev (private)
Repl ID: 614cf7f9-2ede-4fb9-9adf-3ea8e70dbc36
Browser: Chrome (Used desktop app)
OS: MacOS
Device (Android, iOS, n/a leave blank): Macbook Pro Ventura 14"
Plan (Free, Hacker, Pro Plan): Pro Plan