What is the primary purpose of generics in TypeScript?
To create dynamic functions without type checking.
To enforce strict types on all variables.
To allow type flexibility while maintaining type safety.
To remove the need for interfaces and type aliases.
This question is part of this quiz :
Generics in TypeScript Quiz