CapitalizeFirst<T>:T extends `${infer First}${infer Rest}` ? `${Capitalize<First>}${Rest}` : T
Capitalizes the first character of a string literal type while preserving the rest.
This is particularly useful when you need to transform string literal unions into
their capitalized counterparts.
Capitalizes the first character of a string literal type while preserving the rest. This is particularly useful when you need to transform string literal unions into their capitalized counterparts.