Currently, I am delving into learning typescript and attempting to create a simple 'let' statement. However, I encountered an error indicating the need to use ECMAScript 6 or later versions. The exact message from the typescript compiler states:
Error:(11, 5) TS1153: 'let' declarations are only available when targeting ECMAScript 6 and higher.
Here is the part of the code triggering the error:
class website{
url:string;
facebookLikes:number;
}
let google = new website();
google.url = "google.com";
google.facebookLikes = 23124;
After doing some research online, I came across a solution advising me to adjust the settings by going to languages and frameworks -> javascript -> and changing it to EcmaScript6. Despite following this suggestion, the error persists.
If anyone has insights on how to resolve this issue, your assistance would be highly valued. Thank you.