@forest-js/core
Version:
A tiny, functional DOM engine with explicit update and real DOM.
16 lines • 646 B
TypeScript
import { StoreMap, Utility } from "../types";
/**
* @function addClear
* @description Clears store bindings when a specific condition is met.
*
* @template S - StoreMap type.
* @param store - The store to clear.
* @param shouldClear - Condition to trigger clearing.
* @returns A utility for handling store cleanup.
* @example
* ```ts
* const clearStore = addClear(myStore, (values) => values.name === "John")(MyElement);
* ```
*/
export declare const addClear: <S extends StoreMap>(store: S, shouldClear: (values: Record<keyof S, ReturnType<S[keyof S]["get"]>>) => boolean) => Utility<HTMLElement>;
//# sourceMappingURL=clear.d.ts.map