mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-08-22 11:40:10 +08:00
Add declaration for the Swipe
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
// Creation of element
|
||||
window.mySwipe = Swipe(document.getElementById('slider'));
|
||||
Vendored
+28
@@ -0,0 +1,28 @@
|
||||
// Type definitions for Swipe 2.0
|
||||
// Project: https://github.com/thebird/Swipe
|
||||
// Definitions by: Andrey Kurdyumov <https://github.com/kant2002>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
|
||||
interface SwipeOptions {
|
||||
startSlide?: number;
|
||||
speed?: number;
|
||||
auto?: number;
|
||||
continuous?: boolean;
|
||||
disableScroll?: boolean;
|
||||
stopPropagation?: boolean;
|
||||
callback?: (index, elem) => void;
|
||||
transitionEnd?: (index, elem) => void;
|
||||
}
|
||||
|
||||
declare class Swipe {
|
||||
constructor(container: HTMLElement, options: SwipeOptions);
|
||||
prev();
|
||||
next();
|
||||
getPos();
|
||||
getNumSlides();
|
||||
kill();
|
||||
attachEvents();
|
||||
setup();
|
||||
slide(index: number, duration: number);
|
||||
}
|
||||
Reference in New Issue
Block a user