Library API
    Preparing search index...

    Function proxify

    • Creates a Stealth Proxy pattern to allow for on-demand lazy property discovery and registration. Provides deep-freezing and bounding capabilities depending on options.

      Type Parameters

      • T extends object

      Parameters

      • target: T

        The object to proxify

      • Optionalfrozen: true

        Whether the proxy should throw on mutation (default: true)

      • Optionallock: boolean

        Whether to deep-freeze the underlying target (default: frozen)

      • Optionalskip: WeakSet<object>

        A WeakSet of objects to skip during deep-freeze

      Returns Readonly<T>

      The proxified object

      const p = proxify({ a: 1 });
      
    • Creates a Stealth Proxy pattern to allow for on-demand lazy property discovery and registration. Provides deep-freezing and bounding capabilities depending on options.

      Type Parameters

      • T extends object

      Parameters

      • target: T

        The object to proxify

      • frozen: false

        Whether the proxy should throw on mutation (default: true)

      • Optionallock: boolean

        Whether to deep-freeze the underlying target (default: frozen)

      • Optionalskip: WeakSet<object>

        A WeakSet of objects to skip during deep-freeze

      Returns T

      The proxified object

      const p = proxify({ a: 1 });
      
    • Creates a Stealth Proxy pattern to allow for on-demand lazy property discovery and registration. Provides deep-freezing and bounding capabilities depending on options.

      Type Parameters

      • T extends object

      Parameters

      • target: T

        The object to proxify

      • Optionalfrozen: boolean

        Whether the proxy should throw on mutation (default: true)

      • Optionallock: boolean

        Whether to deep-freeze the underlying target (default: frozen)

      • Optionalskip: WeakSet<object>

        A WeakSet of objects to skip during deep-freeze

      Returns T | Readonly<T>

      The proxified object

      const p = proxify({ a: 1 });