zustand-storage
Version:
A universal solution combining @aivron/sync-storage and zust-api for React (web & desktop). It merges local persistence with a Zustand-inspired API to provide core storage operations, bulk actions, JSON support, TTL, and integrated React hooks.
22 lines (21 loc) • 734 B
TypeScript
/**
* Deeply merges two objects.
* @param target - The target object.
* @param source - The source object.
* @returns The merged object.
*/
export declare function deepMerge<T>(target: T, source: Partial<T>): T;
/**
* Shallowly merges two objects.
* @param target - The target object.
* @param source - The source object.
* @returns The merged object.
*/
export declare function shallowMerge<T>(target: T, source: Partial<T>): T;
/**
* Creates a debounced version of a function.
* @param func - The function to debounce.
* @param wait - The delay in milliseconds.
* @returns The debounced function.
*/
export declare function debounce<T extends (...args: any[]) => void>(func: T, wait: number): T;