Generic (TypeScript)

A generic is a type that takes another type as a parameter, written in angle brackets like `Array<string>`. Generics let you write reusable code that works…