UNPKG

@exadel/esl

Version:

Exadel Smart Library (ESL) is the lightweight custom elements library that provide a set of super-flexible components

24 lines (23 loc) 1 kB
import { Rect } from '../dom/rect'; export declare class RectMock extends Rect implements DOMRect { constructor(); constructor(x: number, y: number, width: number, height: number); toJSON(): DOMRect; } export declare class IntersectionObserverMock implements IntersectionObserver { callback: IntersectionObserverCallback; constructor(callback: IntersectionObserverCallback); root: Document | Element | null; rootMargin: string; get thresholds(): number[]; takeRecords(): IntersectionObserverEntry[]; private _onObserve; observe(element: Element): void; unobserve(element: Element): void; disconnect(): void; static createEntry(target: Element, init: Partial<IntersectionObserverEntry>): IntersectionObserverEntry; static trigger($el: Element, detail: Partial<IntersectionObserverEntry> | Partial<IntersectionObserverEntry>[]): void; static mock(): void; static unmock(): void; static get lastInstance(): IntersectionObserverMock; }