0
0
Typescriptprogramming~5 mins

TypeScript Compiler Installation and Setup - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is the command to install the TypeScript compiler globally using npm?
The command is npm install -g typescript. This installs the TypeScript compiler so you can use the tsc command anywhere on your computer.
Click to reveal answer
beginner
What does the tsc command do?
The tsc command runs the TypeScript compiler. It converts TypeScript files (.ts) into JavaScript files (.js) that browsers can understand.
Click to reveal answer
beginner
Why do we need to install Node.js before installing TypeScript?
Node.js provides the npm tool, which is used to install TypeScript and other packages. Without Node.js, you cannot use npm to install the TypeScript compiler.
Click to reveal answer
intermediate
What is the purpose of the tsconfig.json file in a TypeScript project?
The tsconfig.json file tells the TypeScript compiler how to compile your project. It sets options like which files to include, the JavaScript version to output, and other settings.
Click to reveal answer
beginner
How can you check if TypeScript is installed correctly on your system?
Run the command tsc --version in your terminal or command prompt. If it shows a version number, TypeScript is installed correctly.
Click to reveal answer
Which command installs TypeScript globally on your computer?
Anpm install typescript
Bnode install typescript
Ctsc install
Dnpm install -g typescript
What file extension does TypeScript use for its source files?
A.ts
B.js
C.tsx
D.json
What is the main purpose of the TypeScript compiler?
ATo run JavaScript code
BTo convert JavaScript to TypeScript
CTo convert TypeScript to JavaScript
DTo install Node.js
Before installing TypeScript, which software must be installed first?
APython
BNode.js
CJava
DGit
What command checks the installed TypeScript version?
Atsc --version
Bnpm version typescript
Cnode --version
Dtsc check
Explain the steps to install and verify the TypeScript compiler on your computer.
Think about what tools you need and how to check if TypeScript is ready to use.
You got /3 concepts.
    Describe the role of the tsconfig.json file in a TypeScript project setup.
    It's like a settings file for the TypeScript compiler.
    You got /3 concepts.