Review: TypeScript Fundamentals, v3

Created:

Freshly released TypeScript Fundamentals, v3 by Mike North is gold!

I learned something new about:

  • Optional Properties
  • Excess Object Literal Checks
  • Interfaces
  • Functions
  • Classes
  • Generics
  • Type Guards
  • And the most mindblowing - Theory of Type Systems. I had no idea there were 2 types of umm, types? Nominal and Structural. Structural - FTW! :)

Hints for better TS:

  1. Read TypeScript errors from the bottom up because they usually act like stack traces
  2. Use interfaces with heritage clauses like implements because interfaces scale and don't require a rewrite when you modify the base type
  3. Define return types explicitly so the error appears at the declaration instead of execution
  4. Define type parameters as simply as possible. Don't declare generic type as an array right away, ask for an array of generics as a param.

Excited that there's a follow up course - Intermediate TypeScript!

Thank you Mike North for sharing your wisdom! You made me a better TypeScript developer!


Originally posted on LinkedIn