type Entries = { boundingClientRect: DOMRect; intersectionRatio: number; isIntersecting: boolean; }[]; export interface ObserveParams { /** * 出现在页面的回调 */ onAppear?: (params: { entries: Entries; /** * 出现的时间戳 */ appearTimestamp: number; }) => void; /** * 组件移出视窗区域的回调 */ onDisAppear?: (params: { entries: Entries; /** * 出现的时间戳 */ appearTimestamp: number; /** * 消失的时间戳 */ disAppearTimestamp: number; }) => void; /** * advance */ advance?: number | string; /** * from 0.0 to 1.0 */ threshold?: number; /** * 是否允许重复触发 */ repeat?: boolean; /** * IntersectionObserver 允许自定义设置 observer 类 * 默认使用 window.IntersectionObserver */ IntersectionObserverClass?: typeof IntersectionObserver; } export declare const observe: (box: HTMLElement, params: ObserveParams) => () => void; export {}; //# sourceMappingURL=observe.d.ts.map