02693
EndsWith
type ReverseString<T extends string, U extends string = ''> = T['length'] extends 0 ? U : T extends `${infer First}${infer Rest}` ? ReverseString<Rest, `${First}${U}`> : U;
type StartWith<T extends string, U extends string> = T extends `${U}${infer Rest}` ? true : false;
type EndsWith<T extends string, U extends string> = StartWith<ReverseString<T>,ReverseString<U>>;