We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Instead of writing
export const isLanguageCode = tg.isEnum(...enumValues(LanguageCode))
where enumValues is a function defied as follows
enumValues
export function enumValues<T extends object> (enumeration: T): Array<T[keyof T]> { return objectKeys(enumeration) .filter(k => isNaN(Number(k))) .map(k => enumeration[k]) }
allow the consumer to simply write
export const isLanguageCode = tg.isEnum(LanguageCode)
Maybe deprecate listing all values and create a new guard for that?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Instead of writing
where
enumValues
is a function defied as followsallow the consumer to simply write
Maybe deprecate listing all values and create a new guard for that?
The text was updated successfully, but these errors were encountered: