added SwiperModule type

This commit is contained in:
Luiz Filipe Machado Barni
2018-08-31 11:07:10 -03:00
parent 1f0ba3bb86
commit a412f55a1b
+25 -2
View File
@@ -4,7 +4,7 @@
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.9
// declare namespace swiper {
declare module 'swiper' {
declare module 'swiper' {
/**
* Common Swiper events.
*/
@@ -57,6 +57,29 @@
*/
type SwiperEvent = CommonEvent | PaginationEvent | AutoplayEvent | LazyLoadingEvent;
/**
* Swiper module types.
*/
type SwiperModule =
| Navigation
| Pagination
| Scrollbar
| Autoplay
| Parallax
| Lazy
| FadeEffect
| CoverflowEffect
| FlipEffect
| CubeEffect
| Zoom
| Keyboard
| Mousewheel
| Virtual
| HashNavigation
| History
| Controller
| A11y;
type DOM7Element = any;
type SelectableElement = string | HTMLElement;
@@ -1404,7 +1427,7 @@
/**
* Installs modules on Swiper in runtime.
*/
static use(modules: any[]): void;
static use(modules: SwiperModule[]): void;
/**
* Add new slides to the end. slides could be