Neat #TypeScript trick: If we create a Set with a `const` Array, then the type of its elements is the union of the Array element types. In other words: The Set behaves a little like a tuple.
const packStatus = new Set([
'draft',
'approved',
'shipped',
] as const);
// const packStatus: Set<"draft" | "approved" | "shipped">
packStatus.has('abc'); // type error!
// Auto-completion works for the arguments of .has(), .delete(), etc.
Source: Matt Pocock. https://x.com/mattpocockuk/status/1823284205763121573