Skip to main content

@rbxts/expect > getProxyParent

getProxyParent() function

Safely gets the parent of a proxy, without triggering any metamethods.

Signature:

declare function getProxyParent<T = unknown, R = unknown>(proxy: Proxy<T>): Proxy<R> | undefined;

Parameters

Parameter

Type

Description

proxy

Proxy<T>

The proxy to get the parent of.

Returns:

Proxy<R> | undefined

The parent of this proxy, or undefined if it doesn't have one.