mirror of
https://github.com/hanzoai/ts-node.git
synced 2026-10-30 19:36:25 +00:00
* Fix "esm" jsdoc * categorize typedocs; exclude jsonschema tags from typedoc * Resolve #1607: explain common ESM errors in troubleshooting page * improve dark theme contrast * Fix amendment to typedoc categories * big docs overhaul * changes to cater to our readme rendering script * lint-fix * final fixes
514 B
514 B
title
| title |
|---|
| How it works |
ts-node works by registering hooks for .ts, .tsx, .js, and/or .jsx extensions.
Vanilla node loads .js by reading code from disk and executing it. Our hook runs in the middle, transforming code from TypeScript to JavaScript and passing the result to node for execution. This transformation will respect your tsconfig.json as if you had compiled via tsc.
We also register a few other hooks to apply sourcemaps to stack traces and remap from .js imports to .ts.