Watching and restarting
ts-node focuses on adding first-class TypeScript support to node. Watching files and code reloads are out of scope for the project.
If you want to restart the ts-node
process on file change, existing node.js tools such as nodemon, onchange and node-dev work.
There's also ts-node-dev
, a modified version of node-dev
using ts-node
for compilation that will restart the process on file change. Note that ts-node-dev
is incompatible with our native ESM loader.