20140112 top 10 things to know about typescript
DESCRIPTION
Top 10 things to know about TypeScriptTRANSCRIPT
Top 10 things to know about TypeScript
By Anney
04/12/2023 2
1. TypeScript Code is Converted into Plain JavaScript Code
04/12/2023 3
2. Data Types
04/12/2023 4
3. Classes
04/12/2023 5
4. Access Modifiers and Properties
04/12/2023 6
Testing 1
• Create a class named MyCar.
• MyCar has four members viz. _sn, DoorNumber, Color, Run are declared of type number, number, string, and void function. _sn maked as private.
• Finally, create mycar instance with MyCar class.
04/12/2023 7
TypeScript Command Line
04/12/2023 8
5. Static and Instance Members
04/12/2023 9
6. Function Overloading
04/12/2023 10
7. Constructors
04/12/2023 11
Testing 2
• Declare a parameterized constructor for MyCar Class. The constructor has two parameters viz. doorNum, color are declared of type number, string and inside the constructor their values are assigned to repective properties.
• Finally, create mycar instance with MyCar class.
04/12/2023 12
8. Inheritance
04/12/2023 13
Testing 3
• Create a class named Car.
• Car has a member - Name is declared type of string.
• Declare a parameterized constructor for Car Class. The constructor has a parameter - name is declared of type string and inside the constructor it value is assigned to repective property.
• Make MyCar class inherits from the Car class.
• Finally, create mycar instance with MyCar class.
04/12/2023 14
9. Interfaces
04/12/2023 15
10. Modules
04/12/2023 16
References
• Top 10 things to know about TypeScript
• http://www.developer.com/lang/top-10-things-to-know-about-typescript.html
04/12/2023 17
~ THE END ~