davidjerleke / embla-carousel

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

How do i get this to work with typescript? this is the message i'm getting "Property 'dangerouslyGetEngine' does not exist on type 'EmblaCarouselType'." #601

Closed MarvinxKiyingi closed 8 months ago

MarvinxKiyingi commented 8 months ago

Hello David, what a great projekt you have created! i love it.

I'm currently tying to implement the behavior you re-created in the sandbox bellow. But that code seems to only be compatible with js. When i try the code bellow i get this error message "Property 'dangerouslyGetEngine' does not exist on type 'EmblaCarouselType'." it there a way around this while still using typescript?

CodeSandbox?

Originally posted by @davidjerleke in https://github.com/davidjerleke/embla-carousel/issues/105#issuecomment-695769772

davidjerleke commented 8 months ago

Hi @MarvinxKiyingi,

The sandbox you mention is very old and is using an outdated version of Embla. It’s more than one major version behind which means that the API has changed since then.

At the time of writing there’s no equivalent sandbox achieving the same thing with the latest version of Embla. I haven’t had the time to build that.

On a side note: Please create a new discussion before jumping to issues in the future. Thanks for understanding.

Best, David