/** * Converts the first character of string to upper case and the remaining to lower case. * * @template T - Literal type of the string. * @param {T} str - The string to be converted to uppercase. * @returns {Capitalize} - The capitalized string. * * @example * const result = capitalize('fred') // returns 'Fred' * const result2 = capitalize('FRED') // returns 'Fred' */ declare function capitalize(str: T): Capitalize; type Capitalize = T extends `${infer F}${infer R}` ? `${Uppercase}${Lowercase}` : T; export { capitalize };