How to setup VSCode to show typescript error inline

后端 未结 4 1401

I\'m trying to migrate an ES6 project to typescript. This is my first attempt at writing a typescript module in NodeJS.

It seems to work better in Angular-CLI so far.

4条回答
  •  野的像风
    2021-02-18 15:54

    Even without having installed TypeScript locally or globally, the following setup provides inline errors.

    C:/temp
      index.ts
      tsconfig.json
    

    index.ts

    let x: number;
    x = "foo";
    

    tsconfig.json

    { }
    

    Here is a screenshot that shows the inline error in x.

    Please try that setup and report back on what happens.

提交回复
热议问题