Check out my Elasticsearch course and get it for only $10:
https://www.udemy.com/elasticsearch-complete-guide/?couponCode=SLIDESHARE10&utm_source=slideshare&utm_campaign=slideshare&utm_medium=referral
2. WHAT ARE TYPES?
Declaring a variable as a particular type, instead of any type like in normal JavaScript
A variable cannot contain values of other types
Types are checked at compile time
Types included in TypeScript: boolean, number, string, array, enum, any, void
Possible to create one's own types
Types are optional and are not part of the outputted JavaScript
var occupation: string = "Developer";
3. BENEFITS OF TYPES
Type errors are discovered at compile time
Increased IDE assistance
The language automatically ensures better code
Simplifies code & makes it easier to understand
Increased maintainability