๐ ๐๐ฒ๐ด๐ถ๐ป๐ป๐ฒ๐ฟ๐ ๐๐๐ถ๐ฑ๐ฒ ๐๐ผ ๐ง๐๐ฝ๐ฒ๐ฆ๐ฐ๐ฟ๐ถ๐ฝ๐
TypeScript adds types to JavaScript. It helps you find bugs before you run your code. Microsoft made it for big projects. It turns into plain JavaScript. Browsers and Node.js run it.
Why use it?
- Catch errors early.
- Read code faster.
- Get better auto-complete.
- Move from JS slowly.
Main features:
- Static Typing: Set types for numbers or strings.
- Type Inference: TS finds the type for you.
- Interfaces: Set rules for objects.
- Modules: Organize your files.
How to start:
- Run: npm install -g typescript.
- Run: tsc --init.
- Write your code in a .ts file.
- Run: tsc filename.ts.
Use it for:
- Large apps.
- Enterprise software.
- Team projects.
- React, Angular, or Vue apps.
Source: https://dev.to/gopuadks/a-beginners-guide-to-typescript-2336