[Typescript] 105. Medium - Placeholder
type Placeholder<T extends string> = T extends `${string}{${infer P}}${infer REST}`
? P | Placeholder<REST>
: never;
declare function format<S extends string>(template: S, args: Record<Placeholder<S>, unknown>): string
let text = format('Name: {name}, Age: {age}', {name: 'Homer', age: 42})