All You Need to Know About Typescript
Tuesday, Apr 15, 2025
1 min read
Aysham Ali

Setup
Setting up project
npm init -y
Install typescript globally using npm
npm i -g typescript
Verify by
tsc --version
Create a typescript config file
tsc --init --sourceMap --rootDir src --outDir dist
Create src folder with ts file
console.log(“hello”)
Create a launch.json file in vscode
change src and ts to dist and jsAdd a watcher
- Install typescript as dev dependency (locally)
npm i --save-dev typescript
- Install typescript as dev dependency (locally)
Create a Run Task for TS to watch
Create a Build Task for TS to build
Click run button to run code