-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
React TSX doesn't understand function param types #3089
Copy link
Copy link
Closed
Labels
Description
Information
- Language: React TSX (vs Typescript)
- Plugins: as in Test Drive
Description
Consider this code:
function log(msg: string): void {
console.log(msg);
}
When using the Typescript language the string parameter type is identified and highlighted:
When using the React TSX language, the string parameter is not identified and just treated like text:
Since TSX is supposed to be an extension to Typescript, the results should be the same.
Link to broken react TSX highlighting: https://prismjs.com/test.html#language=tsx&text=%2F%2F%20react%20tsx%0Afunction%20log(msg%3A%20string)%3A%20void%20%7B%0A%20%20console.log(msg)%3B%0A%7D%0A
Reactions are currently unavailable

