UNPKG

ng2-idle-core

Version:

ng-idle for Angular 2+ core module

31 lines (30 loc) 1.07 kB
import { InterruptSource } from './interruptsource'; /** * Options for EventTargetInterruptSource */ export interface EventTargetInterruptOptions { /** * The number of milliseconds to throttle the events coming from the target. */ throttleDelay?: number; /** * Whether or not to use passive event listeners. * Note: you need to detect if the browser supports passive listeners, and only set this to true if it does. */ passive?: boolean; } export declare class EventTargetInterruptSource extends InterruptSource { protected target: any; protected events: string; private eventSrc; private eventSubscription; protected throttleDelay: number; protected passive: boolean; constructor(target: any, events: string, options?: number | EventTargetInterruptOptions); protected filterEvent(event: any): boolean; /** * Returns the current options being used. * @return {EventTargetInterruptOptions} The current option values. */ readonly options: EventTargetInterruptOptions; }