npm i -D typescript ts-node nodemon @types/node
// nodemon.json
{
"watch": ["src"],
"ext": "ts",
"exec": "ts-node ./src/app.ts"
}
// package.json
{
"start" :"rm -rf dist/ && tsc --project . && node dist/app.js",
"dev": "nodemon ."
}
yarn add --dev nodemon ts-node
nodemon ./main.ts