-
-
Notifications
You must be signed in to change notification settings - Fork 193
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
Can't import EmblaCaroouselType
, EmblaOptionsType
, EmblaPluginType
from embla-carousel-react
, embla-carousel-vue
and embla-carousel-svelte
#647
Comments
loop
does not exist in type SliderPropsOptions
EmblaOptionsType
doesn't exists in React
Thanks @proninyaroslav, I’ve noted this bug a couple of days ago and already started working on it. However, thanks for creating a bug report so I can connect it to a pull request and devs can track it 👍🏻. Best, |
@proninyaroslav a bug fix for this was just released in |
@davidjerleke |
@proninyaroslav then I suggest you create a CodeSandbox with your setup in order to demonstrate the problem. You didn’t provide one in your bug report but it’s a requirement as mentioned in the contribution guidelines. |
@proninyaroslav I think it's better to get the types directly from the main package. Because import { EmblaOptionsType } from 'embla-carousel'; // Get it like so
import useEmblaCarousel from 'embla-carousel-react'; I will remove the type re-exports from the library wrappers like Best, |
@davidjerleke |
Turns out, this approach doesn’t work with |
@davidjerleke Please let us know when the pnpm solution is ready 🙏 Appreciate all you do |
@div-cowboy, @proninyaroslav. I've added examples of how to import types to the docs. There's also information about how to do it with Important Remember to switch to the React tab if you're using |
EmblaOptionsType
doesn't exists in ReactEmblaCaroouselType
, EmblaOptionsType
, EmblaPluginType
from embla-carousel-react
, embla-carousel-vue
and embla-carousel-svelte
With But no complain if Should I
as Edit: |
@suiboli314 yes, as the docs says: |
Bug is related to
Embla Carousel version
v8.0.0-rc15
Describe the bug
Since version v8.0.0-rc15, ESLint says that the
SliderPropsOptions
type does not have aloop
property. This happens to all properties that are inEmblaOptionsType
:Also because of this,
useEmblaCarousel
has theoptions
argument typePartial<OptionsType> | undefined
instead ofEmblaOptionsType | undefined
, which causes a linter error:The text was updated successfully, but these errors were encountered: