#TypeScript: Stale compiled files can cause issues (when you rename an input file, the old output file isn’t removed). That’s why I occasionally do:
npm run build
"scripts": {
"build": "npm run clean && tsc",
"clean": "shx rm -rf ./dist/*",
···
}
shx provides cross-platform shell commands: https://exploringjs.com/nodejs-shell-scripting/ch_package-scripts.html#file-system-operations