DEV Community

Discussion on: Creative Uses of TypeScript Discriminated Unions

Collapse
michaeljota profile image
Michael De Abreu • Edited on

Nice usage of the discriminate unions. Tip: You don't need to cast the variable. TS will reduce the type in each case.

Play