Passer au contenu principal

Generics

In languages like C# and Java, one of the main tools in the toolbox for creating reusable components is generics, that is, being able to create a component that can work over a variety of types rather than a single one. This allows users to consume these components and use their own types.[[Generics](TypeScript: Documentation - Generics (typescriptlang.org))]

Only generics can have a dynamic type.