fix #62 accept RegExp type block class config
This commit is contained in:
5
typings/types.d.ts
vendored
5
typings/types.d.ts
vendored
@@ -70,11 +70,12 @@ export declare type eventWithTime = event & {
|
||||
timestamp: number;
|
||||
delay?: number;
|
||||
};
|
||||
export declare type blockClass = string | RegExp;
|
||||
export declare type recordOptions = {
|
||||
emit?: (e: eventWithTime, isCheckout?: boolean) => void;
|
||||
checkoutEveryNth?: number;
|
||||
checkoutEveryNms?: number;
|
||||
blockClass?: string;
|
||||
blockClass?: blockClass;
|
||||
ignoreClass?: string;
|
||||
};
|
||||
export declare type observerParam = {
|
||||
@@ -84,7 +85,7 @@ export declare type observerParam = {
|
||||
scrollCb: scrollCallback;
|
||||
viewportResizeCb: viewportResizeCallback;
|
||||
inputCb: inputCallback;
|
||||
blockClass: string;
|
||||
blockClass: blockClass;
|
||||
ignoreClass: string;
|
||||
};
|
||||
export declare type textCursor = {
|
||||
|
||||
4
typings/utils.d.ts
vendored
4
typings/utils.d.ts
vendored
@@ -1,4 +1,4 @@
|
||||
import { Mirror, throttleOptions, listenerHandler, hookResetter } from './types';
|
||||
import { Mirror, throttleOptions, listenerHandler, hookResetter, blockClass } from './types';
|
||||
import { INode } from 'rrweb-snapshot';
|
||||
export declare function on(type: string, fn: EventListenerOrEventListenerObject, target?: Document | Window): listenerHandler;
|
||||
export declare const mirror: Mirror;
|
||||
@@ -6,5 +6,5 @@ export declare function throttle<T>(func: (arg: T) => void, wait: number, option
|
||||
export declare function hookSetter<T>(target: T, key: string | number | symbol, d: PropertyDescriptor): hookResetter;
|
||||
export declare function getWindowHeight(): number;
|
||||
export declare function getWindowWidth(): number;
|
||||
export declare function isBlocked(node: Node | null, blockClass: string): boolean;
|
||||
export declare function isBlocked(node: Node | null, blockClass: blockClass): boolean;
|
||||
export declare function isAncestorRemoved(target: INode): boolean;
|
||||
|
||||
Reference in New Issue
Block a user