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.tsAll lessons in this course
- @types/node, ESM vs CJS in Node
- Runtime options (ts-node/tsx) & sourcemaps