• Courses
  • Tutorials
  • Practice
Switch to Dark Mode

TypeScript | Generics in TypeScript | Question9

Last Updated : Mar 22, 2025
Discuss
Comments

What is the key difference between generics and type aliases?

A

Generics enforce strict types, while type aliases do not.

B

Type aliases are more flexible than generics.

C

Generics allow type flexibility, whereas type aliases define specific structures.

D

Generics are only used for arrays, while type aliases are used for objects.

Share your thoughts in the comments