Duration
2 days
Overview
TypeScript is an open source language for building enterprise JavaScript applications. It is a strict superset of JavaScript that compiles to plain JavaScript and brings static typing and object-oriented development to the language. This instructor-led, live training introduces TypeScript's key features and walks participants through the construction of a real-life JavaScript application.
Prerequisite
- Understanding of JavaScript (or similar languages such as Java, ActionScript, C#, etc.)
- Understanding of Node.js
Module 1: Introduction
In this module we will learn what typescript is and what the benefits of typescript are over other scripting languages. We can also learn how to install and setup the environment and how we can create our first example using typescript.
- What is TypeScript
- Benefits of TypeScript
- Setup the Environment
- First TypeScript Example
Module 2: Data Types and Variables
In this module we will learn what the datatypes that are used in typescript are, and we will introduce into a new data type let.
- Basic Data Types
- Arrays
- Tuples
- Enum
- Any and void
- null and undefined
- Type Inference
- Type Casting
- Difference between let and var
- Const declaration
Module 3: Destructuring & Spread
In this module we will learn how to extract the data from objects and arrays in a convenient way using destructuring and we can learn how to break arrays and objects into components using spreads.
- Array Destructuring
- Object Destructuring
- Mixed Destructuring
- Property renaming
- Default Values
- Spreads
Module 4: Working with Classes
In this module we will learn how to write classes and how to create objects for our classes like we do in other programming languages like java, C# etc. And we can also learn how we can fulfil OOPS concepts using typescript.
- Writing and Using Classes
- Constructor method
- Inheritanceof classes
- Typecasting
- Type Assertion
- Static Properties
- Abstract class
Module 5: Working with Interfaces
In this module we will learn how to work with interfaces in typescript.
- Interface Declaration
- Initialization with an object
- Duck Typing
- Interface Implementation by class
- Interface having Optional Property
- Class extending another class and also implementing an Interface
- Excess Property Checks
- Indexable Types
- Extending Interfaces
Module 6: Generics
In this module we will learn what are generics, when to use them and how to create generics using typescript. And its wide range of usage over all the OOPS concepts.
- When to Use Generic Functions
- Generic Types
- Generic Interface
- Generic Classes
- Generic Constraints
- Using Type Parameters in Generic Constraint
Module 7: Modules and Namespaces
In this module we will learn how to export and import between module. And how can we group the required modules into a namespace.
- Export Syntax
- Import Syntax
- Re-export
- Default exports
- Using require()
- Declaring and Using Namespaces
Module 8: Ambients
In this module we will learn how to make use of our JavaScript functions with typescript.
- Definition
- Syntax
- Examples
Programme scope, delivery arrangements and suitability are confirmed during enquiry.