Cache addHoverClass as it is quite expensive (#643)
* Add cache and cache purging Needed for https://github.com/rrweb-io/rrweb-snapshot/pull/85 * Add cache and cache purging Needed for https://github.com/rrweb-io/rrweb-snapshot/pull/85 * Cache addHoverClass as it is quite expensive https://github.com/rrweb-io/rrweb-snapshot/pull/85 * Make cache non-optional * Make cache required on addHoverClass
This commit is contained in:
7
packages/rrweb-snapshot/typings/rebuild.d.ts
vendored
7
packages/rrweb-snapshot/typings/rebuild.d.ts
vendored
@@ -1,16 +1,19 @@
|
||||
import { serializedNodeWithId, idNodeMap, INode } from './types';
|
||||
export declare function addHoverClass(cssText: string): string;
|
||||
import { serializedNodeWithId, idNodeMap, INode, BuildCache } from './types';
|
||||
export declare function addHoverClass(cssText: string, cache: BuildCache): string;
|
||||
export declare function createCache(): BuildCache;
|
||||
export declare function buildNodeWithSN(n: serializedNodeWithId, options: {
|
||||
doc: Document;
|
||||
map: idNodeMap;
|
||||
skipChild?: boolean;
|
||||
hackCss: boolean;
|
||||
afterAppend?: (n: INode) => unknown;
|
||||
cache: BuildCache;
|
||||
}): INode | null;
|
||||
declare function rebuild(n: serializedNodeWithId, options: {
|
||||
doc: Document;
|
||||
onVisit?: (node: INode) => unknown;
|
||||
hackCss?: boolean;
|
||||
afterAppend?: (n: INode) => unknown;
|
||||
cache: BuildCache;
|
||||
}): [Node | null, idNodeMap];
|
||||
export default rebuild;
|
||||
|
||||
Reference in New Issue
Block a user