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 after upgrading to 8.0.4 with Swiper Events #5454

Closed
5 of 6 tasks
Sergiobop opened this issue Feb 10, 2022 · 7 comments · Fixed by #5462
Closed
5 of 6 tasks

Bug after upgrading to 8.0.4 with Swiper Events #5454

Sergiobop opened this issue Feb 10, 2022 · 7 comments · Fixed by #5462

Comments

@Sergiobop
Copy link

Sergiobop commented Feb 10, 2022

Check that this is really a bug

  • I confirm

Reproduction link

none

Bug description

The ng serve command stops and throws the following error after upgrading the swiper lib:

Error: node_modules/swiper/angular/angular/src/swiper-events.d.ts:3:50 - error TS2344: Type 'SwiperEvents[Property]' does not satisfy the constraint '(...args: any) => any'.
  Type '((swiper: Swiper) => void) | ((swiper: Swiper) => void) | ((swiper: Swiper) => void) | ((swiper: Swiper) => void) | ((swiper: Swiper) => void) | ((swiper: Swiper) => void) | ... 75 more ... | undefined' is not assignable to type '(...args: any) => any'.
    Type 'undefined' is not assignable to type '(...args: any) => any'.

3     [Property in keyof SwiperEvents]: Parameters<SwiperEvents[Property]>;
                                                   ~~~~~~~~~~~~~~~~~~~~~~

Expected Behavior

The project should compile as usual

Actual Behavior

The compilation throws an error.
Downgrading to 8.0.3 solves the problem

Swiper version

8.0.4

Platform/Target and Browser Versions

Chrome

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
@nolimits4web
Copy link
Owner

@github-actions
Copy link

Hello @Sergiobop. 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.

@Sergiobop
Copy link
Author

I saw the migration guide @nolimits4web, but i'm not using any events right now, so i can't update anything related to the point stated in the guide

@BernhardBehrendt
Copy link

Have the same issue after upgrading from 8.03 (works perfect) to 8.0.5 where this error occurs.

@nolimits4web
Copy link
Owner

cc @vltansky

@github-actions
Copy link

Hello @Sergiobop. 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.

@vltansky
Copy link
Collaborator

released in v8.0.6

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

Successfully merging a pull request may close this issue.

4 participants