-2

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).

enter image description here

1

1 Answer 1

0

You should check which version of TypeScript you are using. Optional chaining operator was introduced in version 3.7.

TypeScript 3.7 Documentation

Sign up to request clarification or add additional context in comments.

6 Comments

Hi tnx for anwser. I just did 'npm install -g typescript' and still getting this error.
I just checked. My typscript version: "typescript": "~3.7.5"
Can you copy the error message you get?
Expression expected. ':' expected.
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.
|

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.