I like the tricks :) – Kasia
Generics are just functions (at the type level).
const shout = (str: string) => `${str}!` const shouted = shout("yeah") // shouted = "yeah!" type Shout<Str extends string> = `${Str}!` type Shouted = Shout<"yeah"> // ^? type Shouted = "yeah!"
Crafted with 💛 by Riccardo