You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using Swiper in a React + TypeScript environment.
To access the properties of the Swiper instance, I am importing the type as shown below:
import{SwiperasSwiperType}from'swiper';
While using various properties of the instance, I encountered the following type errors:
Property 'slidesEl' does not exist on type 'Swiper'.ts(2339)
Property 'slidesGrid' does not exist on type 'Swiper'.ts(2339)
Property 'slidesSizesGrid' does not exist on type 'Swiper'.ts(2339)
When checking the instance using console.log(), I was able to confirm that these values are present.
However, it seems that these types are missing from the Swiper type definitions.
(There is a similar issue here, but since type errors are also occurring with the slidesEl and slidesSizesGrid properties in addition to slidesGrid, I have created a new issue.)
Expected Behavior
The properties slidesEl, slidesGrid, and slidesSizesGrid are displayed as part of the Swiper interface.
Actual Behavior
When accessing the slidesEl, slidesGrid, and slidesSizesGrid properties, the following type errors occur:
Property 'slidesEl' does not exist on type 'Swiper'.ts(2339)
Property 'slidesGrid' does not exist on type 'Swiper'.ts(2339)
Property 'slidesSizesGrid' does not exist on type 'Swiper'.ts(2339)
Check that this is really a bug
Reproduction link
https://codesandbox.io/p/sandbox/property-slidesel-slidesgrid-slidessizesgrid-does-not-exist-on-type-swiper-vckw95
Bug description
I am using Swiper in a React + TypeScript environment.
To access the properties of the Swiper instance, I am importing the type as shown below:
While using various properties of the instance, I encountered the following type errors:
When checking the instance using
console.log()
, I was able to confirm that these values are present.However, it seems that these types are missing from the Swiper type definitions.
(There is a similar issue here, but since type errors are also occurring with the
slidesEl
andslidesSizesGrid
properties in addition toslidesGrid
, I have created a new issue.)Expected Behavior
The properties
slidesEl
,slidesGrid
, andslidesSizesGrid
are displayed as part of the Swiper interface.Actual Behavior
When accessing the
slidesEl
,slidesGrid
, andslidesSizesGrid
properties, the following type errors occur:Swiper version
11.1.4
Platform/Target and Browser Versions
All
Validations
Would you like to open a PR for this bug?
The text was updated successfully, but these errors were encountered: