export declare class ObserverServiceConfig { root?: Element | null; rootMargin?: string; threshold?: number | number[]; } export declare type CallbackType = (inViewport: boolean) => void; export interface WatchedItem { element: Element; callback: CallbackType; } export declare class ObserverService { options: ObserverServiceConfig; supported: boolean; watching: Array; observer: IntersectionObserver | null; /** * Assigns the user config if they wish to * override the defaults by using forRoot * @param {ObserverServiceConfig} config */ constructor(config: ObserverServiceConfig); /** * Handles events made by the observer * @param {IntersectionObserverEntry[]} entries */ handleEvent(entries: IntersectionObserverEntry[]): void; /** * Adds the target to our array so we can call its * call back when it enters the viewport * @param {Element} el * @param {CallbackType} callback */ addTarget(el: Element, callback: CallbackType): void; isSupported(): boolean; }