Introduction to Type Script academy zariba com 1
Introduction to Type. Script academy. zariba. com 1
Lecture Content 1. 2. 3. 4. 5. 6. 7. 8. What is Type. Script? Type. Script in Web. Storm Type. Script vs Java. Script (vs Coffee. Script) Data Types and Variables Functions and Generics Classes and Inheritance Modules Secret Bonus Round 2
What is Type. Script? • Typescript is a super-set of Javascript which primarily provides static typing, classes and interfaces. • Open Source. • Any browser. 3
Type. Script in Web. Storm 4
Type. Script vs Java. Script (vs Coffee. Script) return Animal. prototype. introduce. call(this) JS super() TS 5
Coffee. Script 6
Basic Types Type. Script is strongly-typed (unlike Java. Script). • • String – textual datatype Boolean – simple true/false value Array – array of values Any – value may come from dynamic content Number – integer as well as floating-point values Enum – giving friendlier names to numeric sets Void – opposite to type ‘any’ (absence of having any type at all) 7
Functions and Generics • Functions • Overloading with Optional/Default Parameters • Working with Generic type variables 8
Classes and Inheritance • • Classes Inheritance Private/Public Getter/Setter 9
Modules • Not to be confused with Models!! 10
Secret Bonus Round • Be Cool with Web. Storm!!! 11
Zariba Academy Questions 12
- Slides: 12