October 2023
Intermediate to advanced
80 pages
1h 7m
English
If you’ve come from a language with a type system, you might already be familiar with generics. But if you’re like me and your experience consists predominately of dynamic languages like JavaScript, Python, or Ruby, generics might seem a bit bewildering at first. I’m certainly guilty of just copying and pasting examples without fully understanding what’s going on. But fear not! Generics are both powerful and also fairly simple once we understand them. Let’s start at the basics and build up from there, as we work towards a full understanding what generics are and how we can use them in our TypeScript code.
In short, a generic in TypeScript allows us to write reusable code that works with ...
Read now
Unlock full access