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

bug: in IonRouterOutlet types does not follow the proper type documentation #29170

Closed
3 tasks done
khanirrfan opened this issue Mar 16, 2024 · 11 comments
Closed
3 tasks done
Labels

Comments

@khanirrfan
Copy link

Prerequisites

Ionic Framework Version

v7.x

Current Behavior

in IonRouterOutlet types does not follow the proper type documentation, onPointerEnterCapture, onPointerLeaveCapture are included in theOmit<React.HTMLAttributes.
Before releasing the version8.x it was working fine without providing the properties in IonRouterOutlet.

Expected Behavior

It should not ask for the missing properties which are Omitted.

Steps to Reproduce

install Ionic/react 7.0.0 and Ionic/react-router 7.0.0 and Use IonRouterOutlet for routing with Private routes it won't allow with the above mentioned missing property

// onPointerEnterCapture={captureEventOnEnter} onPointerLeaveCapture={undefined}


</IonRouterOutlet

Code Reproduction URL

i do not have hosted code sample project

Ionic Info

error TS2739: Type '{ children: Element[]; }' is missing the following properties from type 'Pick<IonRouterOutlet & { basePath?: string | undefined; ref?: Ref | undefined; ionPage?: boolean | undefined; } & IonicReactProps & Omit<...>, "defaultChecked" | ... 253 more ... | "ionPage">': onPointerEnterCapture, onPointerLeaveCapture

this is the error message getting deploying

Additional Information

No response

@FranciscoKloganB
Copy link

Same issue here. I am working around with a ts-expect-error annotation, but not desirable.

@mib122
Copy link

mib122 commented Mar 17, 2024

Same issue for me

@liamdebeasi
Copy link
Contributor

liamdebeasi commented Mar 18, 2024

Thanks for the issue! This issue is being closed due to the lack of a code reproduction. As noted in the issue template, we need a runnable sample to verify this report. 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.

Thank you for using Ionic!

@liamdebeasi liamdebeasi closed this as not planned Won't fix, can't repro, duplicate, stale Mar 18, 2024
@kenfinnigan
Copy link

I hit this same issue today.

To reproduce, create a new project with ionic start. Don't use the creation wizard. Select React framework and tabs template.

App.jsx fails TS checks on <IonRouterOutlet> because of the missing properties of onPointerEnterCapture and onPointerLeaveCapture

@nathanvick480
Copy link

Same issue here.

@paishin
Copy link

paishin commented Mar 18, 2024

Also having the same issue with a new project using ionic + react. In my case I did use the creation wizard.

@liuwin7
Copy link

liuwin7 commented Mar 19, 2024

The @types/react@18.2.66 had removed the properties onPointerEnterCapture and onPointerLeaveCapture. DefinitelyTyped/DefinitelyTyped#68984
This changes can affect the IonRouterOutlet's type definition.

{
...
- onPointerEnterCapture?: PointerEventHandler<T> | undefined;
- onPointerLeaveCapture?: PointerEventHandler<T> | undefined;
+ onPointerEnterCapture: unknown
+ onPointerLeaveCapture: unknown
}

@liuwin7
Copy link

liuwin7 commented Mar 19, 2024

You can specify the @types/react@18.2.65 and wait for the Ionic team to fix this breaking change.

@DunhamGitHub
Copy link

Same issue here

@liamdebeasi
Copy link
Contributor

liamdebeasi commented Mar 19, 2024

Hi everyone,

We are tracking this in #29178. Unfortunately, Definitely Typed made a breaking change to the types that caused breakages in developer applications (it was classified as a bug fix, but it is causing some apps to no longer compile). We are working with the Stencil team to mitigate this.

@amandaejohnston amandaejohnston removed their assignment Mar 19, 2024
Copy link

ionitron-bot bot commented Apr 18, 2024

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.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Apr 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

10 participants