Skip to content

Files

Latest commit

Aug 31, 2021
de0ebc4 · Aug 31, 2021

History

History
51 lines (34 loc) · 1.09 KB

README.md

File metadata and controls

51 lines (34 loc) · 1.09 KB

node-typescript-cheatsheet

Cheatsheets for experienced Node.js developers getting started with TypeScript

TS config

You can find more recommended TS config here.

Helpful tools

Tip 1

tsconfig.json:

{
  "compilerOptions": {
    "target": "es2015",
    "module": "commonjs"
  }
}

Tip 2

shipping typescript sourcemaps from a node server: http://npm.im/source-map-support

Tip 3

Instead of

nodemon --exec ts-node src/index.ts

do:

tsc --watch
nodemon dist/src/index.js

https://twitter.com/benawad/status/1211700652549779456