Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Randomly stopped understanding TSX #35

Closed
rivertam opened this issue May 31, 2019 · 2 comments
Closed

Randomly stopped understanding TSX #35

rivertam opened this issue May 31, 2019 · 2 comments

Comments

@rivertam
Copy link

Hey, so yesterday I had this random problem where tsserver stopped understanding TSX. I'm starting to get errors like Operator '<' cannot be applied to type 'boolean' and 'StyledComponentClass' as errors/annotations.

I hadn't changed any configurations or updated or anything when this started happening, but I updated coc, coc-tsserver, and neovim since then and there's been no resolution.

I suspect this is an error on my end, but I don't really know where to check. My Create React App instance has no problem parsing these files. My init.vim has only one line mentioning coc: Plug 'neoclide/coc.nvim', { 'tag': '*', 'do': './install.sh' } and the only line about tsx is to call Prettier.

Do you have any recommended debugging steps? It seems like the typescript server calls are not including the fact that it's tsx for some reason.

@chemzqm
Copy link
Member

chemzqm commented May 31, 2019

@chemzqm
Copy link
Member

chemzqm commented Jun 9, 2019

In your tsconfig.json, add "jsx": "react", in "compilerOptions".

Make your filetype to typescript.tsx.

@chemzqm chemzqm closed this as completed Jun 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants