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
Message is declared like this
type Message<Extra extends Record<string, unknown> = any> = | string | ((params: Extra & MessageParams) => unknown) | Record<PropertyKey, unknown>;
But should be like this:
type Message<Extra extends Record<string, unknown> = {}> = | string | ((params: Extra & MessageParams) => unknown) | Record<PropertyKey, unknown>;
Because with any as default, i am getting params type any
any
setLocale({ mixed: { required: (params) => } })
Params should be of type MessageParams
MessageParams
The text was updated successfully, but these errors were encountered:
just in case anyone else need this: i was able to pull MessageParams out of the Message type as a workaround for what i wanted:
Message
type MessageParams = Parameters<Extract<Yup.Message<{}>, Function>>[0] Yup.setLocale({ mixed: { required(params: MessageParams) { console.log(params) }, }, })
i can open a PR with the suggested change too, but i'm not sure what the impact of this type change would be.
Sorry, something went wrong.
No branches or pull requests
Message is declared like this
But should be like this:
Because with
any
as default, i am getting params typeany
Params should be of type
MessageParams
The text was updated successfully, but these errors were encountered: