Checking union types in Typescript
It is a common use case where we check for multiple strings matches in if statements, as shown in the...