Skip to content

Commit

Permalink
Change type
Browse files Browse the repository at this point in the history
  • Loading branch information
YonatanKra committed Nov 5, 2020
1 parent 543b2b4 commit 5d1284e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/list/mwc-list-base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ export {ActionDetail, createSetFromIndex, isEventMulti, isIndexSet, MWCListIndex

function debounceLayout(
callback: <T>(this: T, updateItems: boolean) => void, waitInMS = 50) {
let timeoutId: NodeJS.Timeout;
let timeoutId: number;
return function<T>(this: T, updateItems = true) {
clearTimeout(timeoutId);
// eslint-disable-next-line @typescript-eslint/no-this-alias
const context = this;
timeoutId =
setTimeout(() => callback.apply(context, [updateItems]), waitInMS);
setTimeout(() => callback.apply(context, [updateItems]), waitInMS) as unknown as number;
};
}

Expand Down

0 comments on commit 5d1284e

Please sign in to comment.