valtio
Version:
🧙 Valtio makes proxy-state simple for React and Vanilla
8 lines (7 loc) • 407 B
TypeScript
/**
* Deeply proxies an input while normalizing Maps/Sets into proxyMap/proxySet.
* - Values in refSet or primitives are returned as-is.
* - Map/proxyMap and Set/proxySet are re-instantiated by passing their existing iterables directly.
* - Arrays/objects are rebuilt recursively and wrapped with proxy().
*/
export declare function unstable_deepProxy<T>(obj: T, getRefSet?: () => WeakSet<object>): T;