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

Version 9.3.0 won't compile with Angular 16 & Typescript 5 #6657

Closed
5 of 6 tasks
b416 opened this issue May 9, 2023 · 5 comments
Closed
5 of 6 tasks

Version 9.3.0 won't compile with Angular 16 & Typescript 5 #6657

b416 opened this issue May 9, 2023 · 5 comments

Comments

@b416
Copy link

b416 commented May 9, 2023

Check that this is really a bug

  • I confirm

Reproduction link

https://codesandbox.io/p/sandbox/cpr2lq?file=%2Fpackage.json%3A1%2C1

Bug description

The latest version 9.3.0 throws the following error when compiling :

TS2430: Interface 'SwiperContainerEventMap' incorrectly extends interface 'HTMLElementEventMap'.
Types of property '"click"' are incompatible.
Type 'CustomEvent' is missing the following properties from type 'MouseEvent': altKey, button, buttons, clientX, and 20 more.

The previous version 9.2.4 compiles just fine.

Expected Behavior

Compile without errors.

Actual Behavior

The compiler throws the error above.

Swiper version

9.3.0

Platform/Target and Browser Versions

Linux, any browser

Validations

  • Follow our Code of Conduct
  • Read the docs.
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
  • Make sure this is a Swiper issue and not a framework-specific issue

Would you like to open a PR for this bug?

  • I'm willing to open a PR
@allanpoppe
Copy link

I'm also having the same issue.

"@angular/core": "^16.0.0",
"typescript": "^5.0.4"

@GRDtechlab
Copy link

I am also facing same issue. I am using swiper version 9.3.0 with angular 15.2.8 and same error coming when compiling angular project using ng serve -o. I have also created a stackoverflow question here

Inside tsconfi.json file if I set skipLibCheck : true then it will work but this is not recommended either as per the typescript it will bypass this type checking system.

Please give solution for this. We did not find many content related to angular by visiting official swiper docs. Please add angular related contents too. Thanks.

@Kbdq
Copy link

Kbdq commented May 10, 2023

Please give solution for this

Just install previous version of Swiper until this problem is fixed. npm install [email protected]

@GRDtechlab
Copy link

Please give solution for this

Just install previous version of Swiper until this problem is fixed. npm install [email protected]

Yes. This is working with swiper version 9.2.4

@github-actions
Copy link

Hello @b416. Please provide a online reproduction by codesandbox or a minimal GitHub repository. You can fork one of our demos in codesandbox to get start. Issues labeled by missing demo will be closed if no activities in 3 days.

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

No branches or pull requests

5 participants