Note: TypeScript and C# both were created by the same person named Anders Hejlsberg
Watch Learn TypeScript – Full Video Tutorial by freeCodeCamp.org
- Type Safety
- Improved Tooling
- Improved Maintainability
- Backwards Compatibility
Hello World Steps:
-
Install Node.js from https://nodejs.org/
-
Install TypeScript 4.9+ using Node Package Manager command (https://www.typescriptlang.org/download):
npm install -g typescript
-
Install VSCode from https://code.visualstudio.com/Download
-
Read: https://bobbyhadz.com/blog/typescript-generate-tsconfig-json
-
Read: https://www.typescripttutorial.net/typescript-tutorial/typescript-hello-world/
-
Generate tsconfig.json by giving this command:
tsc --init
If you want to run TypeScript tsc command in Windows Powershell:
-
Open Powershell in Adminstrator mode
-
Run command:
Set-ExecutionPolicy RemoteSigned
Policy updated and now you can run tsc command in powershell.
For more Details Check this out
-
Make it a Node.js project by giving the following command:
npm init -y
-
Install types for Node.js
npm i @types/node -D
-
Create .gitignore file
-
Create file app.ts