import { type VNode } from '../vdom.js'; /** Creates a memoization slot for a view function. On each render, if the * function reference, dispatch, and all arguments are referentially equal * (`===`) to the previous call, the cached VNode is returned without * re-running the view function. Snabbdom's `patchVnode` short-circuits when * it sees the same VNode reference, so both VNode construction and subtree * diffing are skipped. * * Dispatch is part of the cache key because event handlers in the cached * VNode close over the dispatch active when the VNode was built. Returning * a VNode built under a different dispatch would silently misroute every * event from that subtree. * * The cached VNode must be rendered at a single position in the tree. * Snabbdom tracks the real DOM through each VNode's mutable `.elm` field * and assumes one VNode per position. Rendering the same cached VNode at * two positions causes patches to collide and can duplicate or misplace * DOM nodes. If the same content needs to appear in multiple positions, * create one slot per position. */ export declare const createLazy: () => (>(fn: (...args: Args) => VNode | null, args: Args) => VNode | null); /** Creates a keyed memoization map for view functions rendered in a loop. Each * key gets its own independent cache slot. On each render, only entries whose * function reference, dispatch, or arguments have changed by reference are * recomputed. * * Like `createLazy`, each key's cached VNode must be rendered at a single * position in the tree. If the same item needs to appear in multiple * positions, create one keyed lazy per position. */ export declare const createKeyedLazy: () => (>(key: string, fn: (...args: Args) => VNode | null, args: Args) => VNode | null); //# sourceMappingURL=lazy.d.ts.map