Adam's notes

some notes that are useful to me, and might be useful to you.

View My GitHub Profile

18 September 2020

Typescript for Server Development

by

npm i typescript ts-node-dev

folder structure:

|- dist/
	|- index.js
|- package.json
|- src/
	|- index.ts
|- tsconfig.json	

package.json (snip):

  "scripts": {
    "build": "tsc",
    "start": "tsc && node ./dist/index.js",
    "dev": "ts-node-dev --respawn --transpileOnly ./src/index.ts"
  }

tsconfig.json:

{
  "compilerOptions": {
    "rootDir": "./src/",
    "outDir": "./dist/",
    "sourceMap": false,
    "noImplicitAny": true,
    "module": "commonjs",
    "target": "es2016",
    "jsx": "react",
    "allowJs": false,
    "allowSyntheticDefaultImports": true,
    "resolveJsonModule": true,
    "esModuleInterop": true,
    "strict": true
  }
}
tags: