/warsawjs-workshop-37-typescript

WarsawJS Workshop #37 - TypeScript for intermediate users

Primary LanguageTypeScript

WarsawJS Workshop #37 - TypeScript

Agenda

  1. Writing JavaScript and trying to add types
  2. Writing TypeScript from scratch
  3. Configuring a TypeScript project from scratch

Topics to cover

  1. Types
  • Boolean
  • Number
  • String
  • Array
  • Null and Undefined
  • Any (every type at once)
  • Void (opposite of any - no type)
  • Never (something that never occurs)
  1. Interfaces
  • Basic structures
  • Optional fields
  • Function fields
  • Number indexes
  • String indexes
  1. Classes
  • Syntax
  • Inheritance
  • Access modifiers
  • Parameter properties
  • Getters and setters
  • Static
  1. Functions
  • Function syntax
  • Optional parameters
  • Default parameters
  • Function types
  • Rest parameters
  • Overloads
  1. Generics
  • Normal generics
  • Generics with extends keyword
  1. Advanced TypeScript
  • Tuple
  • Enum
  • Type keyword
  • Discriminated unions
  • Type guards
  • Readonly
  • Abstract classes
  • Function interfaces
  • Hybrid types
  • This in functions
  1. Configuration from scratch
  • Tsconfig JSON
  • Type declarations for libraries
  • Stack traces
  • Tests