@opendatasoft/visualizations
Version:
Opendatasoft's components to easily build dashboards and visualizations.
19 lines (18 loc) • 755 B
TypeScript
/**
* Creates a Svelte writable store that compares values deeply before updating.
*
* @param initialValue - The initial value for the store.
* @returns An object containing the subscribe and set methods.
*/
declare const createDeepEqual: <V>(initialValue: V | undefined) => {
/**
* Subscribes to changes in the store's value.
*/
subscribe: (this: void, run: import("svelte/store").Subscriber<V | undefined>, invalidate?: ((value?: V | undefined) => void) | undefined) => import("svelte/store").Unsubscriber;
/**
* Update the store value if the new value differs from the store current value
* by performing a deep comparison.
*/
update: (newValue?: V | undefined) => void;
};
export default createDeepEqual;