Setting up a VSCode environment for working with TypeScript v2.03 has been challenging.
Beginning with a simple vanilla javascript snippet that can be tested in node via the integrated terminal.
function Person() {
this.name = "";
}
Person.prototype.age = 0;
let me = new Person();
The code compiles fine on Typescript Playground website without any complaints.
However, creating a new file in VSCode results in editor complaints:
https://i.sstatic.net/D176X.png
Running webpack with the ts-loader plugin triggers an error: https://i.sstatic.net/w3fg8.png
Compiling using 'tsc src/test.ts' does not produce any complaints.
Important questions:
- Is my code incorrect or is the complaint ignorable?
- Is there a way to stop VSCode from displaying this complaint?