yats.vim
yats.vim copied to clipboard
Issue with template literals (not JSX related)
Highlighting breaks most lines after a template literal statement.
When I comment out that line the highlighting works correcty.
This issue is related but dismissed as a JSX issue, but I don't believe it is. https://github.com/HerringtonDarkholme/yats.vim/issues/47
After further investigation it looks like it is the typecast that is causing the problem. Changing it to this causes the problem.
Might be related to this issue https://github.com/HerringtonDarkholme/yats.vim/issues/122
<Provider>provider
should be provider as Provider
? Only the latter syntax is legal in JSX/TSX. Otherwise, the parser can't tell between JSX with forgotten closing tag and a type cast/assertion. See this section of the Typescript manual on type assertions.
This is a TS file not a TSX file.