material-ui icon indicating copy to clipboard operation
material-ui copied to clipboard

[Modal] Convert code to typescript

Open leventdeniz opened this issue 2 years ago • 8 comments

closes #34716

leventdeniz avatar Oct 16 '22 15:10 leventdeniz

Thank you for your review, I will work on these on the weekend!

leventdeniz avatar Oct 20 '22 18:10 leventdeniz

Messages
:book: Netlify deploy preview: https://deploy-preview-34793--material-ui.netlify.app/

Details of bundle changes

Generated by :no_entry_sign: dangerJS against b511f658aed033071b5892279c006acbd408d393

mui-bot avatar Oct 26 '22 18:10 mui-bot

I can't seem to get these last two type errors solved. Maybe someone could help me with them.

leventdeniz avatar Oct 29 '22 09:10 leventdeniz

Do you need any help resolving merge conflicts or making CI checks green?

Regarding type errors, you need to cast the const ModalUnstyled to OverridableComponent<ModalUnstyledTypeMap> as React.forwardRef messes up the generics. The proper definition of types should allow for the removal of the last @ts-expect-error in ModalUnstyled.spec.tsx.

michaldudak avatar Dec 09 '22 22:12 michaldudak

I did what you suggested but this somehow gave me even more errors in the ModalUnstyled.test.tsx. Thank you for your patience but I think I need help resolving these last few errors.

leventdeniz avatar Dec 12 '22 12:12 leventdeniz

You have done the majority of hard work, thanks! The remaining issue was missing types of React.createRef. I added them. I also removed one of the tests as prop forwarding is already being tested in describeConformanceUnstyled.

michaldudak avatar Dec 14 '22 10:12 michaldudak

Thank you so much for your patience and help, I really appreciate it!

leventdeniz avatar Dec 14 '22 11:12 leventdeniz

Thank you for contributing! Feel free to tackle any other issues.

michaldudak avatar Dec 14 '22 11:12 michaldudak