npm install --save-dev typescript ts-node
npm install --save-dev @types/node
npx tsc --init
/* tsconfig.json */ { "compilerOptions": { // ... "outDir": "./dist", "rootDir": "./src", // ... "lib": ["ES2018"], "target": "ES2018", } }
/* package.json */ "scripts": { "build": "tsc --build", "serve": "ts-node ./src", "start": "node ./dist" }