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

[pickers] Fix AdapterDateFnsV3 generated method types #13464

Merged
merged 4 commits into from
Jun 17, 2024

Conversation

alexey-kozlenkov
Copy link
Contributor

@alexey-kozlenkov alexey-kozlenkov commented Jun 12, 2024

Fixes #13226 as suggested in the comments.

Applied to both AdapterDateFnsJalaliV3 & AdapterDateFnsV3 who rely on date-fns-v3
UPD: Applied to Adapters based on date-fns-v2 as well so the don't lose types when dependency is switched to date-fns-v3

@mui-bot
Copy link

mui-bot commented Jun 12, 2024

Deploy preview: https://deploy-preview-13464--material-ui-x.netlify.app/

Generated by 🚫 dangerJS against 88f6b25

Copy link
Member

@LukasTy LukasTy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution! 🙏

I think that adding explicit types to the V2 adapters wouldn't hurt as well as it would allow us to avoid this problem if we keep both adapters, but just swap the defaults (use v3 in the repo as the default).
It's not a deal-breaker, but depending on who would take on that work and reviewing it, this additional work could help avoiding a very similar problem with V2 adapter in that case.
WDYT? 🤔

@LukasTy LukasTy added bug 🐛 Something doesn't work typescript component: pickers This is the name of the generic UI component, not the React module! labels Jun 12, 2024
@LukasTy LukasTy changed the title Fix date-fns-v3 related adapters generating wrong types furig build [pickers] Fix AdapterDateFnsV3 generated method types Jun 12, 2024
@alexey-kozlenkov
Copy link
Contributor Author

@LukasTy makes sense. I’m away from laptop till next week, will come back to it Monday and supply for date-fns v2

@LukasTy
Copy link
Member

LukasTy commented Jun 12, 2024

makes sense. I’m away from laptop till next week, will come back to it Monday and supply for date-fns v2

Ok, thanks for the update, let's wait for next week. 👌
Have a nice time off. 😉

@alexey-kozlenkov alexey-kozlenkov force-pushed the fix/adapter-date-fns-v3-types branch from b9a0129 to e375906 Compare June 16, 2024 11:57
@alexey-kozlenkov
Copy link
Contributor Author

@LukasTy all done. Have a look please once you have time 🙌

Copy link
Member

@LukasTy LukasTy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much for taking care of it! 🙏
Great job. 👏 💯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: pickers This is the name of the generic UI component, not the React module! typescript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[pickers] AdapterDateFnsV3: Wrong types generated
3 participants