diff --git a/types/isotope-layout/index.d.ts b/types/isotope-layout/index.d.ts index 5e1f0623e4..66d4a21d52 100644 --- a/types/isotope-layout/index.d.ts +++ b/types/isotope-layout/index.d.ts @@ -2,6 +2,7 @@ // Project: http://isotope.metafizzy.co/ // Definitions by: Anže Videnič // Mălin Brândușe +// SPWizard01 // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -30,7 +31,7 @@ declare namespace Isotope { * If set to a string, that value is used as a selector. * If filter is set to a function, that function checks each item and returns true or false if the item should be shown or hidden. */ - filter?: string | (() => boolean); + filter?: string | ((itemElement: HTMLElement) => boolean); /** * Items are arranged into rows. Rows progress vertically. Similar to what you would expect from a layout that uses CSS floats. fitRows works well for items that have the same height. */ diff --git a/types/isotope-layout/isotope-layout-tests.ts b/types/isotope-layout/isotope-layout-tests.ts index 776412b2c2..d37475cefa 100644 --- a/types/isotope-layout/isotope-layout-tests.ts +++ b/types/isotope-layout/isotope-layout-tests.ts @@ -70,8 +70,8 @@ let $grid = $('.grid').isotope({ // test the ones not used in upper test $grid = $('.grid').isotope({ - filter: (): boolean => { - return true; + filter: (itemElem): boolean => { + return itemElem ? true : false; }, sortAscending: { key: true