TypeScript's type system is far more expressive than most developers realise. Once you move beyond basic interfaces and generics, a whole category of compile-time guarantees becomes available.
Template literal types
TypeScript 4.1 introduced template literal types, letting you construct string types programmatically: