TypeScript Node.js Runtime

10.9.2 · active · verified Sat Apr 18

ts-node provides a TypeScript execution environment and REPL for Node.js, offering direct execution of TypeScript files without precompilation, full source map support, and native ESM capabilities. The current stable version is 10.9.2. Releases are frequent, typically addressing bug fixes, performance improvements, and adding support for new TypeScript and Node.js features.

Common errors

Warnings

Install

Imports

Quickstart

Demonstrates how to create a simple TypeScript file and execute it directly using the `ts-node` command-line interface.

/* file.ts */
function greet(name: string): string {
  return `Hello, ${name}!`
}

console.log(greet('ts-node user'))

// To run this: ts-node file.ts

view raw JSON →