0
0
Typescriptprogramming~10 mins

Running TypeScript with ts-node - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to run a TypeScript file using ts-node.

Typescript
ts-node [1]
Drag options to blanks, or click blank then click option'
Aapp.ts
Bapp.js
Cindex.js
Dindex.html
Attempts:
3 left
💡 Hint
Common Mistakes
Using a JavaScript file name instead of a TypeScript file.
Trying to run an HTML file with ts-node.
2fill in blank
medium

Complete the command to install ts-node globally using npm.

Typescript
npm install -g [1]
Drag options to blanks, or click blank then click option'
Atypescript
Btsc
Cts-node
Dnode
Attempts:
3 left
💡 Hint
Common Mistakes
Installing 'typescript' instead of 'ts-node'.
Using 'tsc' which is the TypeScript compiler, not the runner.
3fill in blank
hard

Fix the error in the command to run a TypeScript file with ts-node.

Typescript
ts-node [1]
Drag options to blanks, or click blank then click option'
Ascript.js
Bscript.ts
Cscript.json
Dscript.txt
Attempts:
3 left
💡 Hint
Common Mistakes
Trying to run a JavaScript file with ts-node.
Using a non-TypeScript file extension.
4fill in blank
hard

Fill both blanks to run a TypeScript file with ts-node and pass an argument.

Typescript
ts-node [1] [2]
Drag options to blanks, or click blank then click option'
Aapp.ts
B--help
Cinput.txt
Dscript.js
Attempts:
3 left
💡 Hint
Common Mistakes
Using a JavaScript file instead of TypeScript.
Passing a flag like --help instead of a file argument.
5fill in blank
hard

Fill all three blanks to run a TypeScript file with ts-node, enable transpile-only mode, and pass an argument.

Typescript
ts-node [1] [2] [3]
Drag options to blanks, or click blank then click option'
A--transpile-only
Bapp.ts
Cdata.json
D--help
Attempts:
3 left
💡 Hint
Common Mistakes
Putting the option after the file name.
Using --help instead of --transpile-only.
Passing a wrong argument file.