mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-07 08:45:34 +00:00
Update cheatsheets
This commit is contained in:
10
tldr/ts-node
10
tldr/ts-node
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# ts-node
|
||||
|
||||
> Run TypeScript code directly, without any compiling.
|
||||
> More information: <https://typestrong.org/ts-node>.
|
||||
> More information: <https://typestrong.org/ts-node/docs/options>.
|
||||
|
||||
- Execute a TypeScript file without compiling (`node` + `tsc`):
|
||||
|
||||
@@ -14,11 +14,11 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Execute a TypeScript file without loading `tsconfig.json`:
|
||||
|
||||
`ts-node --skip-project {{path/to/file.ts}}`
|
||||
`ts-node --skipProject {{path/to/file.ts}}`
|
||||
|
||||
- Evaluate TypeScript code passed as a literal:
|
||||
|
||||
`ts-node --eval '{{console.log("Hello World")}}'`
|
||||
`ts-node {{[-e|--eval]}} '{{console.log("Hello World")}}'`
|
||||
|
||||
- Execute a TypeScript file in script mode:
|
||||
|
||||
@@ -26,8 +26,8 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Transpile a TypeScript file to JavaScript without executing it:
|
||||
|
||||
`ts-node --transpile-only {{path/to/file.ts}}`
|
||||
`ts-node {{[-T|--transpileOnly]}} {{path/to/file.ts}}`
|
||||
|
||||
- Display help:
|
||||
|
||||
`ts-node --help`
|
||||
`ts-node {{[-h|--help]}}`
|
||||
|
||||
Reference in New Issue
Block a user