fix #62 accept RegExp type block class config

This commit is contained in:
Yanzhen Yu
2019-04-14 16:11:37 +08:00
parent faed623986
commit 2d8d4b0c19
6 changed files with 28 additions and 16 deletions

5
typings/types.d.ts vendored
View File

@@ -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 = {