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

Throwing Error on Optional Chaining (TS 3.7.2) #1027

Closed
flatherskevin opened this issue Nov 11, 2019 · 5 comments
Closed

Throwing Error on Optional Chaining (TS 3.7.2) #1027

flatherskevin opened this issue Nov 11, 2019 · 5 comments
Labels
locked Please open a new issue and fill out the template instead of commenting.

Comments

@flatherskevin
Copy link

Summary

Prettier VSCode plugin is failing on new TypeScript in version 3.7.2 syntax (specifically optional chaining). Prettier 1.19.1 was release on 11/8/2019 adding support prettier/prettier#6469

Steps To Reproduce:

  1. Add optional chaining syntax x?.y to a TS file
  2. Attempt to auto-format the TS file
  3. Check the Output window of VSCode, and there will be an error of Expression expected pointing to the ?.
  4. Auto-format fails

Expected result

No error should be thrown, and auto-format should succeed

Actual result

See steps to reproduce

VS Code Version: 1.40.0

Prettier & Prettier Plugin Version: 1.19.1 and 2.3.0 respectively

OS and version: macOS 10.14.6

@flatherskevin
Copy link
Author

#1025 related. Just saw this automated PR is out but failing

@flatherskevin flatherskevin mentioned this issue Nov 11, 2019
13 tasks
@flatherskevin
Copy link
Author

As a note, v3.1.0 of the plugin (which is in preview) does successfully work with TS v3.7.2

@ntotten
Copy link
Member

ntotten commented Nov 11, 2019

Version 3.0 is now released to the normal extension location.

@ntotten ntotten closed this as completed Nov 11, 2019
@riesvriend
Copy link

VSCode is still on 3.6.x, you need to force it to use the locally installed typescript in node_modules (to 3.7.2), see https://code.visualstudio.com/docs/typescript/typescript-compiling#_using-newer-typescript-versions

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot added the locked Please open a new issue and fill out the template instead of commenting. label Apr 12, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked Please open a new issue and fill out the template instead of commenting.
Projects
None yet
Development

No branches or pull requests

3 participants