Open shaKY-iota opened 2 years ago
// your answers type ReplaceAll<S extends string, From extends string, To extends string> = From extends "" ? S : S extends `${infer First}${From}${infer Last}` ? `${ReplaceAll<First, From, To>}${To}${ReplaceAll<Last, From, To>}` : S