TypeScript Fundamentals, v3 by Mike North is gold!
Freshly releasedI 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:
- Read TypeScript errors from the bottom up because they usually act like stack traces
- Use interfaces with heritage clauses like
implements
because interfaces scale and don't require a rewrite when you modify the base type - Define return types explicitly so the error appears at the declaration instead of execution
- 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