Function createBlacklistProxy

  • Creates a proxy object that restricts access to the properties of the target object based on a blacklist. 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.

    Parameters

    • target: T

      The target object to be proxied.

    • Rest...blacklist: K[]

    Returns Omit<T, K>

    A proxy object that only allows access to the properties specified in the whitelist.