00116
Replace
type Replace<S extends string, From extends string, To extends string, U extends string = '', END extends boolean = false> =
From extends '' ? S :
END extends true ? `${U}${S}` :
S['length'] extends 0 ? U :
S extends `${From}${infer Rest}` ? Replace<Rest, From, To,`${U}${To}`, true> :
S extends `${infer First}${infer Rest}` ? Replace<Rest, From, To,`${U}${First extends From ? From : First}`>: U;