This solution is generated by ChatGPT, correctness is not guaranteed. You might also be able to find a solution fromcommunity posts.
AI solution for TypeScript puzzle on BFE.dev
32. implement RepeatString<T, C>
type RepeatString<T, C extends number> = C extends 0 ? '' : `${T}${RepeatString<T, C-1>}`;type A = RepeatString<'a', 3> // 'aaa'type B = RepeatString<'a', 0> // ''