TypeScript

Generic

Definition

A TypeScript feature that lets you write reusable code that works with multiple types. Generics use type parameters (like `<T>`) that are specified when the function or class is used.

Code Example

Typescript
Tip: Modify the code above and click “Run” to see the results

Learn More

Related Terms