koSakano/type-challenges

147 - C-printf Parser

Opened this issue · 0 comments

type ParsePrintFormat<S> = S extends `${infer U}%${infer V}${infer W}` ? V extends keyof ControlsMap ? [ControlsMap[V], ...ParsePrintFormat<W>] : ParsePrintFormat<W> : [];