Introduction to TypeScript

Duration: 1 day

This course is geared towards developers needing to get up to speed with TypeScript quickly. Developers should have a basic knowledge of JavaScript. Familiarity with node.js, npm/yarn is not required, but helpful

Please find the course objectives below:

Introduction

  • Introduce TypeScript
  • Setting up a typescript project
  • Configuring the compiler
  • Use and configure TsLint

Namespaces

  • Understand modules and namespaces
  • Learn various import and export techniques

Types annotations

  • Understand the type system
  • Dealing with null and undefined (using strictNullChecks)
  • Write enums
  • Work with arrays
  • Use tuples
  • Advanced types such as unions and intersections

Functions

  • Working with functions
  • function parameters: optional, default values
  • Define rest parameters (aka varying arguments)
  • Appreciate overloading
  • Use type queries and guards

Interfaces

  • Define interfaces
  • Duck typing with interfaces
  • Define properties
  • Define optional properties
  • Declare readonly properties
  • indexable types
  • Define function and constructor types

Classes

  • Write classes
  • Adding properties
  • Adding methods
  • Understand scopes
  • Use inheritance
  • overriding methods
  • abstract classes/methods
  • Write accessors
  • Use static members

Other

  • Work with Generics (classes, interfaces, methods, etc)
  • Introduction to writing and using Decorators
For an onsite course please contact us