You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks! I think this would be a good change to make. We'll want to do make this change for both useIonModal and useIonPopover, and T should continue to be any if not set to avoid breaking changes.
@liamdebeasi, in my testing Typescript automatically infers T based on the component you pass it. By making the proposed change I was able to see type errors with incorrect params in my usage without adding any explicit generic declarations to my code :)
This issue has been labeled as help wanted. This label is added to issues that we believe would be good for contributors.
If you'd like to work on this issue, please comment here letting us know that you would like to submit a pull request for it. This helps us to keep track of the pull request and make sure there isn't duplicated effort.
For a guide on how to create a pull request and test this project locally to see your changes, see our contributing documentation.
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.
Activity
aeharding commentedon Dec 11, 2023
FYI I see #27548, this seemed a bit more open-ended so I decided to make a separate issue in smaller scope (fixing the types).
[-]feat: Improved types for useIonModal[/-][+]feat: Improved types for react useIonModal[/+]liamdebeasi commentedon Dec 11, 2023
Thanks! I think this would be a good change to make. We'll want to do make this change for both
useIonModalanduseIonPopover, andTshould continue to beanyif not set to avoid breaking changes.aeharding commentedon Dec 11, 2023
@liamdebeasi, in my testing Typescript automatically infers T based on the component you pass it. By making the proposed change I was able to see type errors with incorrect params in my usage without adding any explicit generic declarations to my code :)
liamdebeasi commentedon Dec 11, 2023
I'm aware, I was just clarifying that we shouldn't default it to anything else 😄
ionitron-bot commentedon Jan 9, 2024
This issue has been labeled as
help wanted. This label is added to issues that we believe would be good for contributors.If you'd like to work on this issue, please comment here letting us know that you would like to submit a pull request for it. This helps us to keep track of the pull request and make sure there isn't duplicated effort.
For a guide on how to create a pull request and test this project locally to see your changes, see our contributing documentation.
Thank you!
mikelhamer commentedon Jul 23, 2024
Is this still relevant?
aeharding commentedon Jul 23, 2024
Yes, and my PR was close to being merged, but @liamdebeasi left Ionic so no progress since
mikelhamer commentedon Jul 23, 2024
Ah, thank you. I'm new here and digging around for ways to help. So your PR partially completed the feature, but there is some left to do?
feat(react): type overlay hook component props (#31362)
ionitron-bot commentedon Sep 18, 2026
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.