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

Vue package - Incorrect types for emblaApi #366

Closed
1 task done
davidjerleke opened this issue Sep 12, 2022 · 5 comments
Closed
1 task done

Vue package - Incorrect types for emblaApi #366

davidjerleke opened this issue Sep 12, 2022 · 5 comments
Labels
bug Something isn't working resolved This issue is resolved typescript Issue is related to TypeScript vue Issue is related to Vue

Comments

@davidjerleke
Copy link
Owner

davidjerleke commented Sep 12, 2022

Bug is related to

  • embla-carousel-vue

Embla Carousel version

  • v7.0.2

Describe the bug

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

  • 'EmblaCarouselType | HTMLElement'

Expected behavior

The type should be:

  • 'EmblaCarouselType | null'

Additional context

Thanks @rojadesign for reporting this.

@davidjerleke davidjerleke added bug Something isn't working vue Issue is related to Vue typescript Issue is related to TypeScript labels Sep 12, 2022
@davidjerleke
Copy link
Owner Author

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

export type EmblaCarouselVueType = [
  Ref<HTMLElement | undefined>,
  Ref<EmblaCarouselType | undefined>
]

@rojadesign
Copy link
Contributor

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

davidjerleke added a commit that referenced this issue Sep 12, 2022
…i_types

Vue Package: fixed types for emblaApi. #366
@davidjerleke
Copy link
Owner Author

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
Copy link
Contributor

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

@davidjerleke davidjerleke added the resolved This issue is resolved label Sep 12, 2022
@davidjerleke
Copy link
Owner Author

davidjerleke commented Sep 12, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working resolved This issue is resolved typescript Issue is related to TypeScript vue Issue is related to Vue
Projects
None yet
Development

No branches or pull requests

2 participants