Hello does anyone know why am i getting errors while using null sage operators in typescript? How to solve this problem? I am using visual code(mac).
1 Answer
You should check which version of TypeScript you are using. Optional chaining operator was introduced in version 3.7.
6 Comments
Baretka
Hi tnx for anwser. I just did 'npm install -g typescript' and still getting this error.
Baretka
I just checked. My typscript version: "typescript": "~3.7.5"
Etheraex
Can you copy the error message you get?
Baretka
Expression expected. ':' expected.
Etheraex
The version of TypeScript you provided in the comment above is, I assume, from your package.json file. You should check if VS Code itself is using this version. You can see this in the bottom right corner of VS Code when you have some TS file open.
|
