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

Broken Typescript typings for useSwiper #5420

Closed
5 of 6 tasks
akaSybe opened this issue Feb 2, 2022 · 0 comments · Fixed by #5421
Closed
5 of 6 tasks

Broken Typescript typings for useSwiper #5420

akaSybe opened this issue Feb 2, 2022 · 0 comments · Fixed by #5421
Labels

Comments

@akaSybe
Copy link

akaSybe commented Feb 2, 2022

Check that this is really a bug

  • I confirm

Reproduction link

https://codesandbox.io/s/sparkling-violet-iz32o?file=/src/App.tsx

Bug description

In #5413 were added Typescript types for useSwiper but they are broken

2cbf82c

Actual value that's in context looks like this:

18bb89b#diff-dd4f3389b95eb9f01032cf016a5a172c4351afd70c27da05429b19721371445fR197-R203

So useSwiper's type instead just:

() => SwiperClass

should be something like that:

() => { value: SwiperClass, nextEl: ..., ... }

Expected Behavior

No response

Actual Behavior

No response

Swiper version

8.0.4

Platform/Target and Browser Versions

macOS 11.4, Chrome 97

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant