44. implement ReplaceAll<S, F, T>

TypeScript

  - accepted / - tried

Just like String.prototype.replaceAll(),

please implement ReplaceAll<S, F, T>.

type A = ReplaceAll<'aba', 'b', ''> // 'aa'
type B = ReplaceAll<'ababbab', 'b', ''> // 'aaa'

Let's try to solve this problem within 10 minutes.

Discuss(2)