ts-node

Run TypeScript code directly, without any compiling.

TLDR

Execute a TypeScript file without compiling (node + tsc)

$ ts-node [path/to/file.ts]
copy

Execute a TypeScript file without loading tsconfig.json

$ ts-node --skip-project [path/to/file.ts]
copy

Evaluate TypeScript code passed as a literal on the command-line

$ ts-node --eval '[console.log("Hello World")]'
copy

Execute a TypeScript file in script mode

$ ts-node --script-mode [path/to/file.ts]
copy

Transpile a TypeScript file to JavaScript without executing it

$ ts-node --transpile-only [path/to/file.ts]
copy

Display TS-Node help

$ ts-node --help
copy

Copied to clipboard
Binance