From 11f8a78f71452600562fb9de13ef46f2617db941 Mon Sep 17 00:00:00 2001 From: Yanzhen Yu Date: Wed, 1 Apr 2026 12:00:00 +0800 Subject: [PATCH] update typings --- src/snapshot.ts | 2 +- typings/snapshot.d.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/snapshot.ts b/src/snapshot.ts index f0b1813d..49642ed7 100644 --- a/src/snapshot.ts +++ b/src/snapshot.ts @@ -270,7 +270,7 @@ export function serializeNodeWithId( function snapshot( n: Document, - blockClass = 'rr-block', + blockClass: string | RegExp = 'rr-block', ): [serializedNodeWithId | null, idNodeMap] { resetId(); const idNodeMap: idNodeMap = {}; diff --git a/typings/snapshot.d.ts b/typings/snapshot.d.ts index a121f558..7de5fb4c 100644 --- a/typings/snapshot.d.ts +++ b/typings/snapshot.d.ts @@ -2,5 +2,5 @@ import { serializedNodeWithId, idNodeMap } from './types'; export declare function resetId(): void; export declare function absoluteToStylesheet(cssText: string, href: string): string; export declare function serializeNodeWithId(n: Node, doc: Document, map: idNodeMap, blockClass: string | RegExp, skipChild?: boolean): serializedNodeWithId | null; -declare function snapshot(n: Document, blockClass?: string): [serializedNodeWithId | null, idNodeMap]; +declare function snapshot(n: Document, blockClass?: string | RegExp): [serializedNodeWithId | null, idNodeMap]; export default snapshot;