I am trying to create a date object of javascript to store current date and time
let now:Date = new Date();
But the below line show error in my intellij as the below error:
TS2304:Cannot find name 'Date'.
I am guessing as Date is javascript object and new Date() is not available in typescript or in my project, its failing.
I am writing angularjs 1.5.9 in typescript, I dont thing is anything related to angularjs.
How to fix this?
Step 1. Simply click on the version displayed in the footer of your visual studio code.
Step 2. Then choose Use Workspace version.
You will be good to go.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With