UNPKG

@studiometa/js-toolkit

Version:

A set of useful little bits of JavaScript to boost your project! 🚀

17 lines (16 loc) • 748 B
import type { BaseDecorator, BaseInterface } from '../Base/types.js'; import type { Base, BaseProps } from '../Base/index.js'; export interface WithIntersectionObserverProps extends BaseProps { $options: { intersectionObserver: IntersectionObserverInit; }; $observer: IntersectionObserver; intersected(entries: IntersectionObserverEntry[]): void; } export interface WithIntersectionObserverInterface extends BaseInterface { $observer: IntersectionObserver; } /** * IntersectionObserver decoration. */ export declare function withIntersectionObserver<S extends Base>(BaseClass: typeof Base, defaultOptions?: IntersectionObserverInit): BaseDecorator<WithIntersectionObserverInterface, S, WithIntersectionObserverProps>;