The ability to reply to discussions is limited to PRO members. Want to join in the discussion? Click here to subscribe now.

Union Types and Type Aliases in TypeScript

Union Types and Type Aliases in TypeScript

5:01
Sometimes we want our function arguments to be able to accept more than 1 type; e.g. a string or an array. This lesson will show us how to assign more than 1 type to a variable with Typescript union types and type aliases.
Watch this lesson now
Avatar
egghead.io

Sometimes we want our function arguments to be able to accept more than 1 type; e.g. a string or an array. This lesson will show us how to assign more than 1 type to a variable with Typescript union types and type aliases.

HEY, QUICK QUESTION!
Joel's Head
Why are we asking?