Tim Mouskhelichvili • January 30, 2023 • 5 minutes to read
Like many other programming languages, TypeScript gives developers access to generics. But what are they, and how and when to use them? Generics make it simple to create reusable components. They allow developers to create a function, class, or [...]
Tim Mouskhelichvili • December 12, 2022 • 2 minutes to read
Sometimes, a TypeScript developer wants to make an arrow function accept different types. That's where generic functions come into play. To make an arrow function generic, you need to add a generic parameter to it like this: const getX [...]