export utils as public API

This commit is contained in:
Yanzhen Yu
2020-06-15 17:10:18 +08:00
parent 7feb2c945c
commit 4cf196718c
7 changed files with 16 additions and 11 deletions

3
typings/index.d.ts vendored
View File

@@ -1,6 +1,7 @@
import record from './record';
import { Replayer } from './replay';
import { mirror } from './utils';
import * as utils from './utils';
export { EventType, IncrementalSource, MouseInteractions, ReplayerEvents, } from './types';
declare const addCustomEvent: <T>(tag: string, payload: T) => void;
export { record, addCustomEvent, Replayer, mirror };
export { record, addCustomEvent, Replayer, mirror, utils };

View File

@@ -1,2 +1,4 @@
import { observerParam, listenerHandler, hooksParam } from '../types';
export declare const INPUT_TAGS: string[];
export declare const MASK_TYPES: string[];
export default function initObservers(o: observerParam, hooks?: hooksParam): listenerHandler;

2
typings/utils.d.ts vendored
View File

@@ -3,7 +3,7 @@ import { INode } from 'rrweb-snapshot';
export declare function on(type: string, fn: EventListenerOrEventListenerObject, target?: Document | Window): listenerHandler;
export declare const mirror: Mirror;
export declare function throttle<T>(func: (arg: T) => void, wait: number, options?: throttleOptions): (arg: T) => void;
export declare function hookSetter<T>(target: T, key: string | number | symbol, d: PropertyDescriptor, isRevoked?: boolean): hookResetter;
export declare function hookSetter<T>(target: T, key: string | number | symbol, d: PropertyDescriptor, isRevoked?: boolean, win?: Window & typeof globalThis): hookResetter;
export declare function getWindowHeight(): number;
export declare function getWindowWidth(): number;
export declare function isBlocked(node: Node | null, blockClass: blockClass): boolean;