Reference typescript definitions in one file, instead of all JS files?

后端 未结 2 1736
野的像风
野的像风 2021-01-05 03:10

I\'m working on a Node JS (+Express) project in Visual Studio Code, and am wondering if there is a way to reference TypeScript definitions in one global spot, rather than ha

2条回答
  •  春和景丽
    2021-01-05 03:25

    Okay so after a couple of restarts with Code, it seems that most of the time it will pick up the typescript definitions that you've included in other files.

    I think I'll still go with Steve's answer though, as that way I can avoid having a bunch of references in my code.

提交回复
热议问题