mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-02-23 17:22:43 +00:00
* Added perPage property Siema makes the property perPage available, and it is useful to be able to read it, so I'm adding it to the type definition. * added test * added myself as contributor * fixed tests
42 lines
1.4 KiB
TypeScript
42 lines
1.4 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>
|
|
// Jonathan Loss <https://github.com/barroudjo>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
|
|
export default class Siema {
|
|
currentSlide: number;
|
|
perPage: 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;
|
|
}
|