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

[ts] support optional chaining operator #283

Closed
alur opened this issue Jan 16, 2020 · 2 comments
Closed

[ts] support optional chaining operator #283

alur opened this issue Jan 16, 2020 · 2 comments

Comments

@alur
Copy link

alur commented Jan 16, 2020

Typescript 3.7 added a new "?." operator, which currently breaks syntax highlighting.

https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-7.html

@alur
Copy link
Author

alur commented Jan 16, 2020

I noticed you already had a commit for this (5d7f6d2), but it doesn't seem to work.

Even for something simple like

const x = z?.a;
let y = 2;

@marijnh
Copy link
Member

marijnh commented Jan 17, 2020

My bad, I added it to the JS mode (since it's also about to become standard there), but didn't notice that the TypeScript mode overrode the rule that it occurred in, so it wasn't working there yet. Attached patch fixes that.

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