Type Transformations Workshop (9 exercises)
Problem

Extract the Discriminator from a Discriminated Union

In this exercise, we have the same Event discriminated union that we’ve used before:

Your job is to grab the type of click or focus or keyDown from the discriminated union so that the following test passes:

Loading exercise

Transcript

0:00 In this exercise, we have a discriminated union, the same one that you've seen before. What I'd like you to do is grab out the type here of click or focus or keydown from the discriminated union.

0:13 This exercise is actually easier than it seems, so don't go too deep into anything too crazy. All of the pieces that you need for this have been covered before. Good luck.