davidjerleke / embla-carousel

A lightweight carousel library with fluid motion and great swipe precision.
https://www.embla-carousel.com
MIT License
5.5k stars 167 forks source link

Vue package - Incorrect types for emblaApi #366

Closed davidjerleke closed 1 year ago

davidjerleke commented 1 year ago

Bug is related to

Embla Carousel version

Describe the bug

The typings are wrong for emblaApi that are exposed from embla-carousel-vue package. The current type is:

Expected behavior

The type should be:

Additional context

Thanks @rojadesign for reporting this.

davidjerleke commented 1 year ago

@rojadesign I think the types here should be something along these lines:

export type EmblaCarouselVueType = [
  Ref<HTMLElement | undefined>,
  Ref<EmblaCarouselType | undefined>
]
rojadesign commented 1 year ago

@davidjerleke exactly, I'm on it and will make a PR!

davidjerleke commented 1 year ago

Hi @rojadesign,

I just released v7.0.3 that includes the fix for this type bug. Please update to the latest version and give it a go. Let me know how it goes.

Thanks for reporting this.

Best, David

rojadesign commented 1 year ago

@davidjerleke works like a charm, thank you for everything! 🤘🏼

davidjerleke commented 1 year ago

@rojadesign, thanks again for reporting this problem 👍🏻.