UNPKG

@omostan/ngx-idle

Version:

A module for responding to idle users in Angular applications. this is a forked version of the original @ng-Idle

35 lines 1.37 kB
import { EventTarget } from './eventtarget'; import { InterruptOptions } from './interruptoptions'; 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: EventTarget<any> | (() => EventTarget<any>); protected events: string; private opts?; private eventSrc; private eventSubscription; protected throttleDelay: number; protected passive: boolean; constructor(target: EventTarget<any> | (() => EventTarget<any>), events: string, opts?: number | EventTargetInterruptOptions); initialize(options?: InterruptOptions): void; protected filterEvent(event: any): boolean; /** * Returns the current options being used. * @return The current option values. */ get options(): EventTargetInterruptOptions; } //# sourceMappingURL=eventtargetinterruptsource.d.ts.map