1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-22 14:22:07 +02:00
tldr/pages/common/ts-node.md
Lena 7ca1069d76
pages/*: reword descriptions without using "a CLI for" etc. (#10437)
Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
2023-07-16 19:23:40 +02:00

28 lines
672 B
Markdown

# ts-node
> Run TypeScript code directly, without any compiling.
> More information: <https://typestrong.org/ts-node>.
- Execute a TypeScript file without compiling (`node` + `tsc`):
`ts-node {{path/to/file.ts}}`
- Execute a TypeScript file without loading `tsconfig.json`:
`ts-node --skip-project {{path/to/file.ts}}`
- Evaluate TypeScript code passed as a literal:
`ts-node --eval '{{console.log("Hello World")}}'`
- Execute a TypeScript file in script mode:
`ts-node --script-mode {{path/to/file.ts}}`
- Transpile a TypeScript file to JavaScript without executing it:
`ts-node --transpile-only {{path/to/file.ts}}`
- Display TS-Node help:
`ts-node --help`