**@types/siema : Trying to address missing configuration options in the definition file interfaces**

* changed `onInit` to optional so that standard javascript objects could be used for Siema configration without having `onInit` defined
* According to the Siema documentation, `perPage` can be either a number or a object with breakpoint values as keys and number of slides as values:
    * https://github.com/pawelgrzybek/siema
    * https://codepen.io/pawelgrzybek/pen/dWbGyZ
This commit is contained in:
Sam Nau
2017-11-28 15:30:25 -06:00
parent e9430decb9
commit 08bc4cb219
+6 -2
View File
@@ -17,17 +17,21 @@ declare class Siema {
destroy(restoreMarkup: boolean, callback?: () => void): void;
}
interface perPageInterface {
[key : number] : number;
}
interface SiemaOptions {
selector?: string;
duration?: number;
easing?: string;
perPage?: number;
perPage?: number | perPageInterface;
startIndex?: number;
draggable?: boolean;
multipleDrag?: boolean;
threshold?: number;
loop?: boolean;
onInit(): void;
onInit?(): void;
onChange?(): void;
}