Options (3)
-e, --evalbooleanEvaluate TypeScript code passed as a literal
Example:
ts-node {{[-e|--eval]}} '{{console.log("Hello World")}}'-T, --transpileOnlybooleanTranspile a TypeScript file to JavaScript without executing it
Example:
ts-node {{[-T|--transpileOnly]}} {{path/to/file.ts}}-h, --helpbooleanDisplay help
Example:
ts-node {{[-h|--help]}}Examples (6)
Execute a TypeScript file without compiling (Node + `tsc`)
ts-node path/to/file.tsExecute a TypeScript file without loading `tsconfig.json`
ts-node --skipProject path/to/file.tsEvaluate TypeScript code passed as a literal
ts-node [-e|--eval] 'console.log("Hello World")'Execute a TypeScript file in script mode
ts-node --script-mode path/to/file.tsTranspile a TypeScript file to JavaScript without executing it
ts-node [-T|--transpileOnly] path/to/file.tsDisplay help
ts-node [-h|--help]made by @shridhargupta | data from tldr-pages