Skip to content

Latest commit

 

History

History
72 lines (36 loc) · 1.82 KB

README.md

File metadata and controls

72 lines (36 loc) · 1.82 KB

Typescript

Learning Typescript in very basic steps

Note: TypeScript and C# both were created by the same person named Anders Hejlsberg

Check out

Watch Learn TypeScript – Full Video Tutorial by freeCodeCamp.org

TypeScript Tips

Typescript RoadMap:

For the latest docs

The main benefits of using TypeScript include:

  1. Type Safety
  2. Improved Tooling
  3. Improved Maintainability
  4. Backwards Compatibility

Hello World Steps:

  1. Install Node.js from https://nodejs.org/

  2. Install TypeScript 4.9+ using Node Package Manager command (https://www.typescriptlang.org/download):

     	npm install -g typescript
    
  3. Install VSCode from https://code.visualstudio.com/Download

  4. Read: https://bobbyhadz.com/blog/typescript-generate-tsconfig-json

  5. Read: https://www.typescripttutorial.net/typescript-tutorial/typescript-hello-world/

  6. Generate tsconfig.json by giving this command:

     tsc --init
    

If you want to run TypeScript tsc command in Windows Powershell:

  1. Open Powershell in Adminstrator mode

  2. Run command:

     Set-ExecutionPolicy RemoteSigned
    

Policy updated and now you can run tsc command in powershell.

For more Details Check this out

  1. Make it a Node.js project by giving the following command:

     npm init -y
    
  2. Install types for Node.js

     npm i @types/node -D
    
  3. Create .gitignore file

  4. Create file app.ts

TypeScript Cheetsheet