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
Information
Description
Consider this code:
When using the Typescript language the
stringparameter type is identified and highlighted:When using the React TSX language, the
stringparameter 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