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 faster transpileModule. 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 within cwd only. stay in your lane (affectionate). 🌈
  • --files β€” load files, include and exclude from tsconfig.json on 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 reading tsconfig.json. ignoring it entirely. respectfully. πŸ™…
  • --skip-ignore β€” skip --ignore checks. πŸƒ
  • --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. πŸŽ€βœ¨πŸ¦‹