export type PartialIntersectionObserverEntry = Pick & Partial>; /** * Mock-implementation of `IntersectionObserver` with ability of simulating intersections programmatically. * Useful for unit testing. */ export declare class IntersectionObserverMock implements IntersectionObserver { /** @inheritdoc */ readonly root: Element | Document | null; /** @inheritdoc */ readonly rootMargin: string; /** @inheritdoc */ readonly thresholds: ReadonlyArray; /** Callback. */ protected readonly callback: IntersectionObserverCallback; /** Observed elements. */ protected readonly elements: Set; constructor(callback: IntersectionObserverCallback, init?: IntersectionObserverInit); /** @inheritdoc */ observe(target: Element): void; /** @inheritdoc */ unobserve(target: Element): void; /** @inheritdoc */ disconnect(): void; /** @inheritdoc */ takeRecords(): IntersectionObserverEntry[]; /** * Calls callback with given entries. * Each entry can omit all fields except `target`. * @param entries Entries. */ simulateIntersection(entries: PartialIntersectionObserverEntry[]): void; }