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

Typing of slideNext and slidePrev is wrong #7205

Open
6 tasks done
sha237gh opened this issue Nov 23, 2023 · 1 comment
Open
6 tasks done

Typing of slideNext and slidePrev is wrong #7205

sha237gh opened this issue Nov 23, 2023 · 1 comment

Comments

@sha237gh
Copy link

Check that this is really a bug

  • I confirm

Reproduction link

https://stackblitz.com/edit/stackblitz-starters-igjhxg?file=src%2Fmain.ts

Bug description

The typings for the functions slideNext and slidePrev are typed as voids in node_modules/swiper/types/swiper-class.d.ts, however when logging their return values it appears that they are indeed returning boolean values. In the stackblitz use the buttons to slide around and check the console.

Expected Behavior

slideNext and slidePrev typings return booleans.

Actual Behavior

slideNext and slidePrev typings return voids.

Swiper version

11.0.5

Platform/Target and Browser Versions

macOs Chrome 119.0.6045.159

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
@Meshavegas
Copy link

i have the same issue,
next js 14

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

No branches or pull requests

2 participants