Error: Typescript Feature 1.5. Current language level is 1.4

后端 未结 6 1510
不知归路
不知归路 2021-02-04 23:08

I am working in the context of Visual Studio 2015 (with Resharper), and am referencing a TypeScript definitions file for NodeJS. I have 3 other VS projects that are using

6条回答
  •  傲寒
    傲寒 (楼主)
    2021-02-04 23:28

    I found out how to fix this. First, if you are using Resharper, as others have mentioned, you need to indicate the version of typescript you are using:

    However, within Visual Studio you need to go to Tools/Extensions and Updates and upgrade the Typescript extension to the latest version.

    Do this by searching for "typescript" under the "installed" tab. In the yellow box I highlighted you should see a message saying that any available updates are available under the "Updates" tab. Go to the "Updates" tab and update your typescript extension to the latest version. (I had already made the update so no update selection is now available to me for Typescript).

    UPDATE:
    It is simplest to go to download and install "Typescript for Visual Studio" to get the latest version: https://www.microsoft.com/en-us/download/details.aspx?id=48593

提交回复
热议问题