Skip to content

Commit

Permalink
Fixed false implicit type from DEFAULT_CALLBACK (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
a-fitzgerald authored Apr 21, 2022
1 parent 326f449 commit 051d4d4
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
import ACTIVE_EVENTS from './active-events';
import supportPassiveEvent from './supportPassiveEvent';

const DEFAULT_CALLBACK = () => undefined;
const DEFAULT_CALLBACK = (_ : CallbackPayload) => {};
const DEFAULT_THROTTLE = 500;
const DEFAULT_TIMEOUT = 30000;

interface CallbackPayload {
idle: boolean,
event?: Event
}

const defaultEventOption = {
capture: false,
passive: false,
Expand All @@ -14,10 +19,7 @@ class IdleTracker {
callback: ({
idle,
event,
}: {
idle: boolean;
event?: Event | undefined;
}) => void;
}: CallbackPayload) => void;

events: Array<Event['type']>;

Expand Down

0 comments on commit 051d4d4

Please sign in to comment.