- TypeScript was developed by Microsoft about 8 years ago (first public release: 1 October 2012)
- TypeScript is a superset of JavaScript, which means that every valid JavaScript code is a valid TypeScript code
- TypeScript is written in TypeScript. That's called recursion
- Morever, TypeScript source code is available on GitHub with 8.7k+ forks and 65.2k+ stars ⭐
- TypeScript is compiled to JavaScript
- C# and TypeScript were developed by the same developer, Anders Hejlsberg
Why should you learn TypeScript?🤔
1. TypeScript provides you with types in JavaScript.
What does that mean?
JavaScript not provide you to define the type of variable you want while declaring it. The type keeps changing according to the value assigned to it.
But using TypeScript you have this feature
TS :
var hello:String = "Hello World";
JS:
var hello = "Hello World";
TypeScript Compiler compiles your *.ts file and checks for any errors in types. If you try to assign another type of value to a variable, then your TypeScript Compiler will surely give you an error.
Means if you write this code
var hello:String = "Hello World";
hello = 123;
Then you will get this error Type 'number' is not assignable to 'String'
Looks like a nice catch, isn't it
Im different words TypeScript is strongly typed language
2. TypeScript is Open Source
What makes a developer feel more proud then using an Open Source software? Nothing, Yeah😇!
3. Huge community
TypeScript has a huge community of developers on Stackoverflow and other sites. So, if you will ever fall in some problem, there will be always someone to help you out.
4. Better for huge projects
TypeScript is mainly used for large projects becuase it provides much better exception catches.
Some awesome examples of Open Sourced TypeScript projects:
Do you want to create a website, or wanna deploy your apps on #Google PlayStore or #Apple@AppStore. Or you are learning just for fun...
Ask yourself this question before starting with actual coding
2. Choose your language according to your needs...
For eg for becoming a Front-end developer you need to know HTML, CSS
For making Android apps you need to learn Java
For making a completely working website you need to know JavaScript, HTML and CSS