File tree Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change
1
+ /// <reference path="swipe.d.ts" />
2
+
3
+ // Creation of element
4
+ var mySwipe = new Swipe ( document . getElementById ( 'slider' ) ) ;
Original file line number Diff line number Diff line change
1
+ // Type definitions for Swipe 2.0
2
+ // Project: https://github.com/thebird/Swipe
3
+ // Definitions by: Andrey Kurdyumov <https://github.com/kant2002>
4
+ // Definitions: https://github.com/borisyankov/DefinitelyTyped
5
+
6
+
7
+ interface SwipeOptions {
8
+ startSlide ?: number ;
9
+ speed ?: number ;
10
+ auto ?: number ;
11
+ continuous ?: boolean ;
12
+ disableScroll ?: boolean ;
13
+ stopPropagation ?: boolean ;
14
+ callback ?: ( index : number , elem : HTMLElement ) => void ;
15
+ transitionEnd ?: ( index : number , elem : HTMLElement ) => void ;
16
+ }
17
+
18
+ declare class Swipe {
19
+ constructor ( container : HTMLElement , options ?: SwipeOptions ) ;
20
+ prev ( ) : void ;
21
+ next ( ) : void ;
22
+ getPos ( ) : number ;
23
+ getNumSlides ( ) : number ;
24
+ kill ( ) : void ;
25
+ attachEvents ( ) : void ;
26
+ setup ( ) : void ;
27
+ slide ( index : number , duration : number ) : void ;
28
+ }
You can’t perform that action at this time.
0 commit comments