TypeScript on Node

一些要装的npm

  • express
  • typescript
  • tsd

当用es6 import 提示

D:/Vincent’s Working Folder/Tools/My Git/TypeScript_Node/app.ts(9,27): error TS2307: Cannot find module ‘mongoose’.
D:/Vincent’s Working Folder/Tools/My Git/TypeScript_Node/app.ts(10,33): error TS2307: Cannot find module ‘method-override’.

注意去./typings/tsd.d.ts 里添加对应的reference

tsd install xxx –save 自动保存到tsd.json里