/** * Matches a case-insensitive literal string. * * @template S The string to match. * @example CaseInsensitive<'FOO'> // 'foo' | 'Foo' | 'fOO' | 'FOO' ... */ type CaseInsensitive = S extends `${infer L}${infer R}` ? `${Lowercase}${CaseInsensitive}` | `${Uppercase}${CaseInsensitive}` : S; export type { CaseInsensitive };