From 08bc4cb219984cbb6e62dc16062251469fb8541a Mon Sep 17 00:00:00 2001 From: Sam Nau Date: Tue, 28 Nov 2017 15:30:25 -0600 Subject: [PATCH] **@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 --- types/siema/index.d.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/types/siema/index.d.ts b/types/siema/index.d.ts index 682c0e907e..834184a41e 100644 --- a/types/siema/index.d.ts +++ b/types/siema/index.d.ts @@ -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; }