0Pricing
TypeScript Academy · Lesson

Runtime options (ts-node/tsx) & sourcemaps

Use ts-node or tsx to run TS directly, and sourcemaps for debugging stack traces in Node.

Intro

Goal: Run TypeScript directly in Node with ts-node or tsx, and enable sourcemaps for debugging.

ts-node basics

ts-node compiles and runs TS on the fly. Good for quick scripts, but adds startup overhead.

npx ts-node src/index.ts

All lessons in this course

  1. @types/node, ESM vs CJS in Node
  2. Runtime options (ts-node/tsx) & sourcemaps
← Back to TypeScript Academy