/** * Creates an observer that facilitates the subscription and publication of events. * @public */ export type Listener = (ev: EventType) => void; /** * Subscribes a listener function to receive events of a specific type. * @returns An unsubscribe function. * @public */ export type Subscribe = (listener: Listener) => () => void; /** * Publishes an event of a specific type to all subscribed listeners. * @public */ export type Publish = (event: EventType) => void; /** * Represents an event observer that manages the subscription and publication of events. * @public */ export interface Observer { subscribe: Subscribe; publish: Publish; } /** * Creates a new event observer instance. * @public */ export declare const createObserver: () => Observer; /** * Setup an `IntersectionObserver` which will activate a callback function when an element becomes visible on screen * @param element - HTMLElement to observe * @param callback - any function called when the visibility changes * @returns A cleanup function to disconnect the observer * @public */ export declare const respondToVisibility: (element: HTMLElement, callback: (arg0: boolean) => any) => (() => void); //# sourceMappingURL=observer.d.ts.map