mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-05 15:27:05 +00:00
**@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:
Vendored
+6
-2
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user