@2toad/reflex
Version:
A simple approach to state management
14 lines • 832 B
TypeScript
import { Reflex, DeepReflexOptions } from "./types";
/**
* Creates a deeply reactive value that can track changes to nested properties.
* Uses Proxy to intercept property access and modifications.
*
* @param options - Configuration options for the deep reflex value
* @param options.initialValue - The initial object value to store
* @param options.equals - Optional custom equality function to determine if value has changed
* @param options.deep - Whether to make nested objects deeply reactive (default: true)
* @param options.onPropertyChange - Optional callback for individual property changes
* @returns A reflex object with methods to get/set values and subscribe to changes
*/
export declare function deepReflex<T extends object>(options: DeepReflexOptions<T>): Reflex<T>;
//# sourceMappingURL=deep-reflex.d.ts.map