fix #62 accept RegExp type block class config

This commit is contained in:
Yanzhen Yu
2026-04-01 12:00:00 +08:00
parent 4f58cad48d
commit 503987c583
6 changed files with 28 additions and 16 deletions

View File

@@ -98,11 +98,13 @@ export type eventWithTime = event & {
delay?: number;
};
export type blockClass = string | RegExp;
export type recordOptions = {
emit?: (e: eventWithTime, isCheckout?: boolean) => void;
checkoutEveryNth?: number;
checkoutEveryNms?: number;
blockClass?: string;
blockClass?: blockClass;
ignoreClass?: string;
};
@@ -113,7 +115,7 @@ export type observerParam = {
scrollCb: scrollCallback;
viewportResizeCb: viewportResizeCallback;
inputCb: inputCallback;
blockClass: string;
blockClass: blockClass;
ignoreClass: string;
};