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

The type for bullets and slides of the .d.ts file is not reported correctly in the documentation #4694

Closed
DAnn2012 opened this issue Jun 21, 2021 · 5 comments

Comments

@DAnn2012
Copy link
Contributor

The type for bullets ( Dom7Array[] ) and slides ( any[] ) currently present in the .d.ts files is not reported correctly in the documentation and is therefore omitted

/**
* Dom7 array-like collection of pagination bullets
* HTML elements. To get specific slide HTMLElement
* use `swiper.pagination.bullets[1]`.
*/
bullets: Dom7Array[];

bullets

/**
* Array with slide items passed by `virtual.slides` parameter
*/
slides: any[];

virual-slides

* array with slide items to be rendered
*/
slides: any[];

/**
* Array with slides
*
* @default []
*/
slides?: any[];

This is currently reported in the documentation of version 6.6.2:

doc662

and so it was instead reported in the documentation of version 6.3.5:

doc635

Thanks.

@DAnn2012
Copy link
Contributor Author

DAnn2012 commented Jul 8, 2021

@nolimits4web After the last changes, the problem seems solved only for the slides parameter of Virtual Slides.

virtual-slides-params

But there are still problems with Virtual Slides' slides property

virtual-slides-methods

and Pagination's bullets property.

bullets2

Thanks.

@DAnn2012
Copy link
Contributor Author

DAnn2012 commented Jul 23, 2021

@nolimits4web Even after the release of version 6.8.0, of version 6.8.1, of version 6.8.2 and of version 6.8.3 this situation persists. So you think it's okay as it is?

Thanks.

@fenyiwudian
Copy link

report another types here.

image

seems controller.control should be Swiper | Swiper[] rather than Swiper only.

@DAnn2012
Copy link
Contributor Author

DAnn2012 commented Aug 20, 2021

Hello @fenyiwudian

In fact, a few months ago (efd95a8) it was only correct in ControllerOptions:

export interface ControllerOptions {
/**
* Pass here another Swiper instance or array with Swiper instances that should be controlled
* by this Swiper
*/
control?: Swiper | Swiper[];

and not in ControllerMethods:

export interface ControllerMethods {
/**
* Pass here another Swiper instance or array with Swiper instances that should be controlled
* by this Swiper
*/
control?: Swiper;
}

This is for Swiper version 6. But the correction was made a few days ago for the next version 7 of Swiper. (e132ee8#diff-ec4479e8b288c50c24a59fc71a3125198455f42023d8412247dd970040dad7e1)

@nolimits4web
Copy link
Owner

fixed in #4846

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants