ts-node

Open Source

by ts-node

Provided by ts-node

Not yet rated
Platform
Web
Pricing
Open Source
Account required
No
Ads
None
Last verified
6 hours ago
Developer
ts-node
Official URL

Overview

ts-node is a command-line tool and library that lets Node.js run TypeScript files directly. Instead of compiling your .ts files to JavaScript first, it hooks into Node's module loading and converts the code on the fly, so you can type one command and have a script run.

It also includes an interactive TypeScript REPL, reads your tsconfig.json automatically, maps stack traces back to the original TypeScript lines, and has a loader for native ECMAScript modules. Type checking is optional: you can keep it on for safety or turn it off for faster start-up, and you can swap in a third-party transpiler.

It is aimed at developers writing scripts, tests and development servers in TypeScript. It is installed from npm next to the typescript package, with a local per-project install recommended. The project is MIT licensed. Note that its most recent release dates from December 2023, so it has not been updated for a while.

Features

  • Runs .ts files in Node.js without a separate compile step
  • Interactive TypeScript REPL
  • Reads tsconfig.json automatically and picks defaults to match your Node version
  • Optional type checking, which can be switched off for speed
  • Loader for native ECMAScript modules
  • Support for third-party transpilers and custom transformers
  • Source-mapped stack traces that point at your TypeScript lines
  • Works with test runners, debuggers and other command-line tools

Privacy

ts-node runs entirely on your own machine as an npm package and has no accounts. See the official privacy policy.

Pros & Cons

Pros

  • Removes the build step during development and for one-off scripts
  • Free and open source under the MIT licence
  • Uses your existing tsconfig.json, so there is little extra setup
  • Can still be combined with precompiling for production

Cons

  • No new release since December 2023, so newer TypeScript and Node features may lag
  • Start-up is slower with type checking switched on
  • Needs Node.js and the typescript package installed alongside it
  • Native ES module projects need extra configuration

Community Reviews (0)

No written reviews yet — be the first to rate this tool.

Similar Tools