type ResolveLexiconWildcard = T extends `${infer Prefix}*` ? true extends UnionMemberIsAssignableTo<keyof Records, `${Prefix}${string}`> ? keyof Records & `${Prefix}${string}` extends infer Lexicon extends string ? Lexicon : never : `${Prefix}${string}` : T
Resolves a wildcard string to the record types it matches.