type VowelLower = 'a' | 'e' | 'i' | 'o' | 'u';
type IsVowel<T extends LowerAlphabet> = T extends VowelLower ? true : false;
type Test1 = IsVowel<'a'>; // true
type Test2 = IsVowel<'b'>; // false
const validateLowercase = (char: string): char is LowerAlphabet => {
return char.length === 1 && char >= 'a' && char <= 'z';
};
Represents the set of lowercase English alphabet letters. A union of string literals from
'a'to'z'.Useful for type-safe operations that require lowercase letters only, such as CSS class naming, identifier validation, or alphabet-based algorithms.