Extract
This lesson explains the extract mapped type.
We'll cover the following...
We'll cover the following...
Description of Extract
The next mapped type is Extract. It allows us to extract from a set of types the one that is common in another type. The following code shows that the first generic argument has three variables (string, string[], and number) and the second generic type is unknown[], which means any kind of array. Extract returns string[] | number[] ...