Union types We can use union types in TypeScript to combine multiple types into one type: let text: string | string[]; Variable text can now be either string or string array which can be pretty handy in some particular cases. Use case in a function: View the code on Gist. You can use union types […]