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
Attempting to utilize the slidesGrid property correctly in TS without errors, which is definitely console logging the correct data in my use case and working as it should. However, in the process of converting this project from JS to TS, I have been hit with this TS linter error: Property 'slidesGrid' does not exist on type 'Swiper'.
The codesandbox example I have created goes directly to the types source file in order to better illustrate the problem, but in my project I am simply importing the type from the library:
import type { Swiper as SwiperType } from 'swiper';
I am assuming adding the property to swiper-class.d.ts (or perhaps there is a more appropriate place for this particular prop) would resolve the issue, and if that is the case, I am happy to create a PR with that addition.
Thanks.
Expected Behavior
slidesGrid shows up as property of the Swiper interface
Actual Behavior
TS linter error: Property 'slidesGrid' does not exist on type 'Swiper'.
Check that this is really a bug
Reproduction link
https://codesandbox.io/p/sandbox/swiper-type-slidesgrid-wwysty?file=%2Fsrc%2FApp.tsx%3A5%2C24
Bug description
Attempting to utilize the slidesGrid property correctly in TS without errors, which is definitely console logging the correct data in my use case and working as it should. However, in the process of converting this project from JS to TS, I have been hit with this TS linter error: Property 'slidesGrid' does not exist on type 'Swiper'.
The codesandbox example I have created goes directly to the types source file in order to better illustrate the problem, but in my project I am simply importing the type from the library:
import type { Swiper as SwiperType } from 'swiper';
I am assuming adding the property to swiper-class.d.ts (or perhaps there is a more appropriate place for this particular prop) would resolve the issue, and if that is the case, I am happy to create a PR with that addition.
Thanks.
Expected Behavior
slidesGrid shows up as property of the Swiper interface
Actual Behavior
TS linter error: Property 'slidesGrid' does not exist on type 'Swiper'.
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: