mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
Note that this *trivially* updates project urls by adding the NPM url to the end, even when the urls are almost identical or the DT one is outdated. I'll clean up the urls in a later commit. This PR is unfinished! Please do not merge it yet.
40 lines
1.3 KiB
TypeScript
40 lines
1.3 KiB
TypeScript
// Type definitions for siema 1.4
|
|
// Project: https://github.com/pawelgrzybek/siema, https://pawelgrzybek.com/siema
|
|
// Definitions by: Irmantas Zenkus <https://github.com/Irmiz>
|
|
// Pavel Puchkov <https://github.com/0x6368656174>
|
|
// Sam Nau <https://github.com/samnau>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
|
|
export default class Siema {
|
|
currentSlide: number;
|
|
|
|
constructor(options?: SiemaOptions);
|
|
|
|
next(index?: number, callback?: () => void): void;
|
|
prev(index?: number, callback?: () => void): void;
|
|
goTo(index: number, callback?: () => void): void;
|
|
remove(index: number, callback?: () => void): void;
|
|
insert(item: HTMLElement, index: number, callback?: () => void): void;
|
|
prepend(item: HTMLElement, callback?: () => void): void;
|
|
append(item: HTMLElement, callback?: () => void): void;
|
|
destroy(restoreMarkup?: boolean, callback?: () => void): void;
|
|
}
|
|
|
|
export interface PageInterface {
|
|
[key: number]: number;
|
|
}
|
|
|
|
export interface SiemaOptions {
|
|
selector?: string | HTMLElement;
|
|
duration?: number;
|
|
easing?: string;
|
|
perPage?: number | PageInterface;
|
|
startIndex?: number;
|
|
draggable?: boolean;
|
|
multipleDrag?: boolean;
|
|
threshold?: number;
|
|
loop?: boolean;
|
|
onInit?(): void;
|
|
onChange?(): void;
|
|
}
|