neoclide / coc-tsserver

Tsserver extension for coc.nvim that provide rich features like VSCode for javascript & typescript
MIT License
1.06k stars 68 forks source link

Optional chaining in JS is highlighted as being erroneous #117

Closed pjg closed 4 years ago

pjg commented 4 years ago

Typescript version which the tsserver uses does support optional chaining, so I'm not sure why such expressions are being highlighted as incorrect JS code:

image

fannheyward commented 4 years ago

Can't reproduce. TypeScirpt bundled in coc-tsserver is already upgrade to 3.7, which Is support optional. Do you has local workspace typescript installed?

pjg commented 4 years ago

That was it, I had to upgrade typescript and related packages in the project to make it all work. Thanks!

MichelKazi commented 3 years ago

I know this is closed, but is there a way to configure coc-tsserver to use my system typescript and not project specific typescript? Looks like a repo at work is using typescript 3.5 still

chemzqm commented 3 years ago

Read configuration in Readme