Syllabus

  1. 01TypesMeet TypeScript: what it adds to JavaScript, how the compiler checks your code before it runs, type inference, type shapes, the any type, type annotations and the strict compiler settings this course uses.7 lessons
    1. 01What Is TypeScript?
    2. 02Type Inference
    3. 03Type Shapes
    4. 04The any Type
    5. 05Type Annotations
    6. 06Compiler Settings and tsconfig.json
    7. 07Project: Ticket Booth Bug Hunt
  2. 02FunctionsType your functions: annotate parameters, make them optional or give them defaults, let TypeScript infer return types or declare them yourself, use void for functions that return nothing, and document functions with JSDoc comments.7 lessons
    1. 01Parameter Type Annotations
    2. 02Optional Parameters
    3. 03Default Parameters
    4. 04Return Types
    5. 05The void Return Type
    6. 06Documenting Functions
    7. 07Project: Recipe Scaler
  3. 03Arrays and TuplesGive arrays element types, nest them for grids, fix their length and order with tuples, see where array inference needs your help, and type rest parameters and spread arguments.6 lessons
    1. 01Array Type Annotations
    2. 02Multi-dimensional Arrays
    3. 03Tuples
    4. 04Array Type Inference
    5. 05Rest Parameters
    6. 06Spread Syntax
  4. 04Custom TypesCreate your own types: enums for fixed sets of options, object types for structured data, type aliases to name and reuse types, function types for callbacks, and generic types and functions that work with many element types.8 lessons
    1. 01Enums
    2. 02String Enums vs. Numeric Enums
    3. 03Object Types
    4. 04Type Aliases
    5. 05Function Types
    6. 06Generic Types
    7. 07Generic Functions
    8. 08Project: Bakery Order Board
  5. 05Union TypesCombine types with unions: accept values of several types, narrow them with typeof, read union return types, type mixed arrays, use the members all union types share, and restrict values to exact options with literal types.7 lessons
    1. 01Defining Unions
    2. 02Narrowing Unions with typeof
    3. 03Inferred Union Return Types
    4. 04Unions and Arrays
    5. 05Common Members
    6. 06Literal Types
    7. 07Project: Parcel Tracker
  6. 06Type NarrowingUse the checks you already write in JavaScript, typeof, equality, the in operator, if...else and early returns, as type guards that tell TypeScript exactly which member of a union you're working with.5 lessons
    1. 01Type Guards
    2. 02Using in as a Type Guard
    3. 03Narrowing with else
    4. 04Narrowing After a Guard
    5. 05Project: Smart Home Commands
  7. 07Advanced Object TypesDescribe objects with interfaces: compare them with type aliases, check classes with implements, nest and compose object types, extend interfaces, allow unknown keys with index signatures, and mark properties as optional.8 lessons
    1. 01Interfaces and Types
    2. 02Interfaces and Classes
    3. 03Deep Types
    4. 04Composed Types
    5. 05Extending Interfaces
    6. 06Index Signatures
    7. 07Optional Type Members
    8. 08Project: Museum Audio Guide