Reputation: 57
Good afternoon! I'm working on react.js with typescript. Recently moved to a new computer and noticed that the syntax highlighting does not work correctly. This happens if there is a double question mark in the code (?? - nullish coalescing operator)
VSCode version 1.26.0,
I can’t install another version of the program, since this is a work computer, not a personal one.
Please tell me how can I solve this problem? Attached 2 screenshots:
:
Upvotes: 1
Views: 1768
Reputation: 20371
So you are using VSCode version 1.26 which was released in July 2018.
Nullish coalescing was added in TypeScript 3.7 and is supported by the syntax highlighter in VSCode since version 1.39 which was released in September 2019.
So you will need to update to at least VSCode version 1.39 to fix this problem.
Upvotes: 2