forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
swipe.d.ts
28 lines (25 loc) · 803 Bytes
/
swipe.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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/DefinitelyTyped/DefinitelyTyped
interface SwipeOptions {
startSlide?: number;
speed?: number;
auto?: number;
continuous?: boolean;
disableScroll?: boolean;
stopPropagation?: boolean;
callback?: (index: number, elem: HTMLElement) => void;
transitionEnd?: (index: number, elem: HTMLElement) => void;
}
declare class Swipe {
constructor(container: HTMLElement, options?: SwipeOptions);
prev(): void;
next(): void;
getPos(): number;
getNumSlides(): number;
kill(): void;
attachEvents(): void;
setup(): void;
slide(index: number, duration: number): void;
}