Scroll to navigation

TS-NODE(1) User Commands TS-NODE(1)

NAME

ts-node - execute JavaScript and TypeScript code

SYNOPSIS

ts-node [options] [-e script] [arguments]

DESCRIPTION

Runs the given script, either in a file or inlined with the -e switch, using Node.js or TypeScript.

Evaluate code
Print result of `--eval`
Require a node module before execution
Opens the REPL even if stdin does not appear to be a terminal
Print CLI usage
Print module version information
Use cwd from <script.ts> instead of current directory
Use TypeScript's faster `transpileModule`
Use TypeScript's compiler host API
Override the path patterns to skip compilation
Path to TypeScript JSON project file
Specify a custom TypeScript compiler

-D, --ignore-diagnostics [code] Ignore TypeScript warnings by diagnostic code

JSON object to merge with compiler options
Specify working directory for config resolution
Scope compiler to files within `cwd` only
Load `files`, `include` and `exclude` from `tsconfig.json` on startup
Use pretty diagnostic formatter (usually enabled by default)
Skip reading `tsconfig.json`
Skip `--ignore` checks
Prefer importing TypeScript files over JavaScript files
Logs TypeScript errors to stderr instead of throwing exceptions
November 2020 ts-node v9.0.0