@colinhacks ("Colin McDonnell") replied to a tweet by @colinhacks:
You can use template literals as the discriminator in a discriminated union. Type narrowing inside if statements works too :)
@colinhacks ("Colin McDonnell") replied to a tweet by @colinhacks:
You can use template literals as the discriminator in a discriminated union. Type narrowing inside if statements works too :)