ts-node is a TypeScript execution engine and just-in-time transpiler for Node.js. It enables the direct execution of TypeScript files by converting them to JavaScript on the fly, removing the requirement for a manual pre-compilation build step. It also provides a TypeScript read-eval-print loop for evaluating expressions and testing code snippets in real time.
The project integrates with the Node.js module system as a loader hook to resolve and load files using native import syntax. It features a pluggable compiler interface that allows the use of external transpilers to accelerate execution and supports shebang-based execution to run scripts as standalone binaries.
Broad capabilities include configurable compilation and transformation scopes, optional type validation to balance startup speed with correctness, and source-map stack tracing to link runtime errors back to the original source code. The engine also supports programmatic registration for loading TypeScript files and provides the ability to create custom interactive shell services.