Description
This registry keeps track of original objects and their proxies.
Core services use it to avoid double-wrapping and to recover the original object when needed (for example in deep-clone flows).
API Reference
Shared in-memory registry that stores target/proxy pairs and lets rs-x move between wrapped and unwrapped references.
Interface: IProxyRegistry
This registry keeps track of original objects and their proxies.
Core services use it to avoid double-wrapping and to recover the original object when needed (for example in deep-clone flows).
Original (non-proxy) object used as registry lookup key.
Proxy instance associated with proxyTarget.
Value checked by isProxy(...) to determine whether it is a registered proxy.
getProxy<T> returns the registered proxy as T.
getProxyTarget<T> returns the original target as T.
isProxy returns boolean; register/unregister return void.
Use register(target, proxy) to add or replace a mapping. Use getProxy(target) to read the proxy and getProxyTarget(proxy) to get the original target back.
isProxy(value) checks whether a value is currently registered as a proxy. unregister(target) removes a mapping.
In the default setup, IProxyRegistry resolves to ProxyRegistry as a singleton service in RsXCoreModule. The registry is memory-only and is not persisted.