UNPKG

fluidstate

Version:

Library for fine-grained reactivity state management

24 lines (23 loc) 1.52 kB
import { ReactiveChange } from "./reactive-plugin"; /** * Generates a list of change descriptions for an object set operation. * This function is intended to be called when a property is set on an object. * * @param object The reactive object proxy. * @param property The property key (string or symbol) being set. * @param isNewProperty Whether this property was newly added to the object. * @param previousValue The value of the property *before* the set operation. * @param nextValue The new value being set for the property. * @returns An array of ReactiveChange objects, or null if no reportable changes occurred (though current implementation always returns a change). */ export declare const getObjectSetChanges: (object: object, property: string | symbol, isNewProperty: boolean, previousValue: unknown, nextValue: unknown) => ReactiveChange[] | null; /** * Generates a list of change descriptions for an object delete operation. * This function is intended to be called when a property is deleted from an object. * * @param object The reactive object proxy. * @param property The property key (string or symbol) being deleted. * @param previousValue The value of the property *before* the delete operation. * @returns An array of ReactiveChange objects, or null if no reportable changes occurred (though current implementation always returns a change). */ export declare const getObjectDeleteChanges: (object: object, property: string | symbol, previousValue: unknown) => ReactiveChange[] | null;