节点打字稿备忘单
供经验丰富的Node.js开发人员使用TypeScript的备忘单
TS配置
您可以找到更多。
有用的工具
Gary Bernhardt谈 :数据库,后端,API和前端
向下进行运行时测试并在运行时进行验证播客讨论
在Express 上将属性附加到req
秘诀1
tsconfig.json :
{
" compilerOptions " : {
" target " : " es2015 " ,
" module: " commonjs "
}
}
秘诀2
从节点服务器发送打字稿源映射: ://npm.im/source-map-support
秘诀3
代替
nodemon --exec ts-node src/index.ts
做:
tsc --watch
nodemon dist/src/index.js