DEV Community

Calin Baenen
Calin Baenen

Posted on

Typescript Example #2.

// An example of using generics in a type union.
// A compact version of my Option<T> type from
// "Typescript Example #1." (https://dev.to/baenencalin/typescript-example-1-ia3).
type Option<T> = T|null;
Enter fullscreen mode Exit fullscreen mode

Top comments (0)