Skip to main content
D
TypeScript
TypeScript Setup

TypeScript Setup

TypeScript installs globally using NPM.

Read Time
5 min read
Difficulty
Beginner
Last Updated
Jun 15, 2026
Version
v1.0.0

Introduction

Before writing TypeScript, developers must install the compiler tool on their computer. The compiler reads the special `.ts` files and translates them into normal `.js` files that web browsers can finally understand.

Syntax

Syntax
1/* terminal commands */
2npm install -g typescript
3tsc --init
4tsc filename.ts

Key Points

  • The `tsc` command stands for TypeScript Compiler.
  • Running `tsc filename.ts` generates a JavaScript file.
  • The `--init` flag creates a configuration file.
  • Most modern frameworks like React setup TypeScript automatically.

Up Next

Continue your journey with the next topic.

Go to TS Types