Join the AI Workshop and learn to build real-world apps with AI. A hands-on, practical program to level up your skills.
Union types let us tell TypeScript a value can be of one type, or another type.
Example:
const run = (a: number | string) => {
//...
}
In this case the parameter a can be either a string, or a number, but nothing else.
