TS-NODE(1)
π ts-node β like, the manual, but make it make sense π
okay bestie, sit down, hydrate, and let me tell you about ts-node from the User Commands section of the manual (that's section 1, iykyk). This is the whole page, every single flag, no skips, no cap. π«Ά
β¨ NAME β¨
ts-node β execute JavaScript and TypeScript code. that's it. that's the whole job. iconic behaviour honestly. π
πΈ SYNOPSIS πΈ
ts-node [options] [-e script] [arguments]
π¦ DESCRIPTION π¦
So basically: it runs the given script, and that script is either chillin' in a file or inlined right there with the -e switch. It runs it using Node.js or TypeScript. your choice, your vibe. β¨
and now, the options. all of them. every last one. let's go π
-e,--eval [code]β evaluate code. like, just run the code you hand it, no file needed. π«-p,--printβ print the result of--eval. so you actually get to see the output instead of it vanishing into the void. π-r,--require [path]β require a node module before execution. pre-game ritual. do the thing first, then run. π-i,--interactiveβ opens the REPL even if stdin does not appear to be a terminal. yes, even then. it's giving main character energy and refusing to be stopped. π-h,--helpβ print CLI usage. your girl when you're lost. π§-v,--versionβ print module version information. receipts! π-s,--script-modeβ use cwd from<script.ts>instead of current directory. so the working directory comes from the script's own location, not wherever you happen to be standing. πΊοΈ-T,--transpile-onlyβ use TypeScript's fastertranspileModule. speed. velocity. zoom. π₯-H,--compiler-hostβ use TypeScript's compiler host API. fancy. β¨-I,--ignore [pattern]β override the path patterns to skip compilation. tell it what NOT to touch. π-P,--project [path]β path to TypeScript JSON project file. point it at your tsconfig. π-C,--compiler [name]β specify a custom TypeScript compiler. bring your own. π-D,--ignore-diagnostics [code]β ignore TypeScript warnings by diagnostic code. silencing the haters, but by number. π-O,--compiler-options [opts]β JSON object to merge with compiler options. smash those settings together. π§©--dirβ specify working directory for config resolution. where the config hunt begins. π--scopeβ scope compiler to files withincwdonly. stay in your lane (affectionate). π--filesβ loadfiles,includeandexcludefromtsconfig.jsonon startup. all three, right at the jump. β--prettyβ use pretty diagnostic formatter (usually enabled by default). the glow-up for your error messages. π--skip-projectβ skip readingtsconfig.json. ignoring it entirely. respectfully. π--skip-ignoreβ skip--ignorechecks. π--prefer-ts-extsβ prefer importing TypeScript files over JavaScript files. TypeScript girlies stay winning. π--log-errorβ logs TypeScript errors to stderr instead of throwing exceptions. so instead of a dramatic throw, it just quietly logs it to stderr. no chaos, just notes. π
ngl bestie, that's the entire page. nothing skipped, nothing merged, nothing invented. every flag is here fr fr. π
okay and for the cute sign-off: this is ts-node v9.0.0, dated November 2020, from the User Commands manual page for TS-NODE(1). mwah. go compile something gorgeous. πβ¨π¦
π¦ where this page comes from
- debian bookworm: ts-node 10.9.1+~cs8.8.29-1 Β· MIT
- debian trixie: ts-node 10.9.2+~cs64.13.20-2 Β· MIT
- ubuntu jammy: ts-node 9.1.1-6 Β· MIT
- ubuntu noble: ts-node 10.9.2+~cs64.13.14-1 Β· MIT
- ubuntu questing: ts-node 10.9.2+~cs64.13.20-2
- ubuntu resolute: ts-node 10.9.2+~cs64.13.20-3build1 Β· MIT
- ubuntu stonking: ts-node 10.9.2+~cs156.14.70-1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms