TS-NODE(1)
π TS-NODE(1) π
okay bestie, welcome to the ts-node-script page from the User Commands corner of the ts-node manual. grab a boba, we're doing this π
β¨ NAME β¨
ts-node-script β run JavaScript and TypeScript code, like, right now, no build step, no drama π¦
πΈ SYNOPSIS πΈ
ts-node-script [options] [-e script] [arguments]
π DESCRIPTION π
So the vibe is: this runs whatever script you hand it β either a file or code you inline with the -e switch β and it runs it through Node.js or TypeScript. that's it, that's the whole job, and it eats every time π₯
lowkey important: it is equivalent to running ts-node with the --script-mode switch. same energy, different entrance. no cap.
π OPTIONS π
-e,--eval [code]β evaluate code, right there on the spot, no file needed β¨-p,--printβ print out the result of--eval(she said show me the receipts π )-r,--require [path]β require a node module before execution, so it's already loaded and ready π«Ά-i,--interactiveβ opens the REPL even if stdin does not appear to be a terminal. yes, even then. she does not care π-h,--helpβ print CLI usage, aka the little map πΊοΈ-v,--versionβ print module version information π-s,--script-modeβ use cwd from<script.ts>instead of current directory. the script's own home is the main character now π-T,--transpile-onlyβ use TypeScript's fastertranspileModule. speed, but make it chaotic π-H,--compiler-hostβ use TypeScript's compiler host API π§-I,--ignore [pattern]β override the path patterns to skip compilation. tell her what to walk past π-P,--project [path]β path to TypeScript JSON project file π-C,--compiler [name]β specify a custom TypeScript compiler, bring your own π₯-D,--ignore-diagnostics [code]β ignore TypeScript warnings by diagnostic code. selective hearing, but for the compiler π§-O,--compiler-options [opts]β JSON object to merge with compiler options π§©--dirβ specify working directory for config resolution π--scopeβ scope compiler to files withincwdonly. stay in your lane (affectionate) π§--filesβ loadfiles,includeandexcludefromtsconfig.jsonon startup π--prettyβ use pretty diagnostic formatter (usually enabled by default). she's already gorgeous but ok π--skip-projectβ skip readingtsconfig.jsonπ--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 π
bestie note: every single one of those flags is listed exactly as it exists. don't freestyle the spelling, the compiler will absolutely notice and it will be embarrassing π
okay that's the whole page, love u, go run something iconic β¨
this was ts-node v9.0.0, from November 2020 β the manual page was TS-NODE(1), and yes she's still serving π ππ¦
π¦ 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