‘Property Declarations’ can only be used in a .ts file (Visual Studio Code)

Visual Studio Code is fast lightweight code editor, but there’s one problem that totally bugs me.


This generates a bunch of malformed errors in syntax detection in the image shown below. If you are facing this issue in Visual Studio Code (v1.5.2), it is because of TS1.8.1.

Here’s how to solve it:

  • Install typescript into your project workspace

  • Select “Preferences > Workspace Settings” in Visual Studio Code.

  • Restart Visual Studio Code.


Leave a Reply

Your email address will not be published. Required fields are marked *