Creating generic type aliases

We can use generics in type aliases as well as interfaces. In this lesson, we will learn how to do this.

Generic type alias syntax

We can pass types into a type alias using the following syntax:

type TypeName<T1, T2, ...> = {
 ...
}

The members of the type can reference the generic types passed into it.

Get hands-on with 1200+ tech skills courses.