Creates a proxy object that restricts access to the properties of the target object based on a whitelist.
Only the properties specified in the whitelist can be accessed, modified, or enumerated.
The underlying target object is not modified in any way, and the proxy references the target object to
provide access to the properties.
Type Parameters
T extends object
The type of the target object.
K extends string | number | symbol
The keys of the target object that are allowed by the whitelist.
Creates a proxy object that restricts access to the properties of the target object based on a whitelist. Only the properties specified in the whitelist can be accessed, modified, or enumerated.
The underlying target object is not modified in any way, and the proxy references the target object to provide access to the properties.