Skip to content
New issue

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

react function last options #1180

Closed
ahsanghalib opened this issue Dec 13, 2020 · 2 comments · Fixed by #1194
Closed

react function last options #1180

ahsanghalib opened this issue Dec 13, 2020 · 2 comments · Fixed by #1194

Comments

@ahsanghalib
Copy link

last two options were optional. but they are not. typescript create error.

const reach = (obj: {}, path: string, value: any, context: any) =>

@mattywong
Copy link
Contributor

@jquense would you be open to a pr for this?

 const reach = (obj: {}, path: string, value: any, context: any) =>  // before

 const reach = (obj: {}, path: string, value?: any, context?: any) => // after

not sure if the getIn function needs to change (though i would assume it would take the same parameters), but there looks like there's tests in place to already test for when there's only the 2 required arguments for reach.

https://github.com/jquense/yup/blob/master/test/yup.js#L100
https://github.com/jquense/yup/blob/master/test/yup.js#L109

@jquense
Copy link
Owner

jquense commented Dec 21, 2020

@mattywong sure!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants