Skip to main content

@rbxts/expect > ProxyInstance > _proxy_parent

ProxyInstance._proxy_parent property​

The proxy that created this proxy.

Signature:

_proxy_parent?: Proxy<unknown>;

Remarks​

You should use getProxyParent() when you want to access this value.

All proxies recursively create proxies of their properties whenever accessed.

This allows the proxy path to be computed in full, even if you only have the final proxy.

Note that if this is the root proxy, then it won't have a parent.

Example​

const proxy = createProxy({name: "Daymon"});
const child = proxy.name;

assert(getProxyParent(child) === proxy);