TypeScript

A more disciplined approach to JavaScript

Primitives

A Union allows developer to tell a variable it can be more than one type

const userId: string | number = 123;
const anotherUserId: string | number = "abc123";