From bd6733b7ebe512e739611cea432c21971853949f Mon Sep 17 00:00:00 2001 From: AntoineC Date: Fri, 15 Sep 2017 23:39:11 +0200 Subject: [PATCH] Add missing type for sortOptions (#174) Fix parameter declaration for getStylesForTransition function. Those two changes allow to use Typescript compiler with option noImplicitAny. --- index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.d.ts b/index.d.ts index 38b9056..e43e41e 100644 --- a/index.d.ts +++ b/index.d.ts @@ -105,7 +105,7 @@ declare class Shuffle { * Gets the visible elements, sorts them, and passes them to layout. * @param {Object} [sortOptions] The options object to pass to `sorter`. */ - sort(sortOptions?): void; + sort(sortOptions?: {reverse?: boolean, by?: Function, randomize?: boolean }): void; /** * Reposition everything. @@ -117,7 +117,7 @@ declare class Shuffle { * Returns styles which will be applied to the an item for a transition. * @param {object} obj Transition options. */ - protected getStylesForTransition({ item: ShuffleItem, styles: object }): object; + protected getStylesForTransition(obj: { item: ShuffleItem, styles: object }): object; /** * Mutate positions before they're applied.