devsite/node_modules/morphdom/index.d.ts
2024-07-07 18:49:38 -07:00

20 lines
621 B
TypeScript

interface MorphDomOptions {
getNodeKey?: (node: Node) => any;
onBeforeNodeAdded?: (node: Node) => Node;
onNodeAdded?: (node: Node) => Node;
onBeforeElUpdated?: (fromEl: HTMLElement, toEl: HTMLElement) => boolean;
onElUpdated?: (el: HTMLElement) => void;
onBeforeNodeDiscarded?: (node: Node) => boolean;
onNodeDiscarded?: (node: Node) => void;
onBeforeElChildrenUpdated?: (fromEl: HTMLElement, toEl: HTMLElement) => boolean;
childrenOnly?: boolean;
}
declare function morphdom(
fromNode: Node,
toNode: Node | string,
options?: MorphDomOptions,
): void;
export = morphdom;