TypeStrong / atom-typescript

The only TypeScript package you will ever need
https://atom.io/packages/atom-typescript
MIT License
1.13k stars 205 forks source link

Support for optional chaining? #1536

Closed ramtinsoltani closed 4 years ago

ramtinsoltani commented 4 years ago

According to the change log TypeScript 3.7 is bundled. Are all new features of 3.7 supported?

I'm trying to use optional chaining and get Expression expected error.

Atom TypeScript: 13.4.8 TypeScript: 3.7.4 Atom: 1.42.0 x64 OS: macOS Catalina 10.15.2

lierdakil commented 4 years ago

Remember that Atom-TypeScript will use whatever TypeScript installation it can find in the project's node_modules, and will only default to the bundled version if it can't find any. It reports which version it's currently using in the status bar, e.g. image

Also, be aware that you likely need to restart Atom after updating TypeScript for it to pick up on the new version.

FWIW, everything works exactly as expected on my end: image

mzarandona-bw commented 4 years ago

Same issue for me.

Atom TypeScript: 13.4.8 TypeScript: 3.7.2 Atom: 1.42.0 x64 OS: macOS 10.15.1

ramtinsoltani commented 4 years ago
Screen Shot 2020-01-13 at 11 51 48 AM

As you see, the picked up version is 3.7.4 and the issue still persists. Are there any compiler options I should provide in tsconfig.json?

lierdakil commented 4 years ago

Please share apm list output, just to make sure we're not hunting ghosts. One particular thing to look out for is ide-typescript package being installed and enabled, because it does not support optional chaining, and will report it as error, and it also calls itself "typescript" in the IDE interface.

In case it's not some other package interfering, here's a minimal project that optional chaining should (i.e. it does on my end) work with: https://gist.github.com/lierdakil/d60962913651781250f7312b497d144a (you can git clone this URL).

ramtinsoltani commented 4 years ago

ide-typescript was the actual problem!

Disabled the package, restarted Atom, and it's working now. Thanks for the help.