Library API
    Preparing search index...

    Function deepFreeze

    • Deep-freeze an Array | Object to make it immutable (with recursion guard).

      Type Parameters

      • const T extends object

      Parameters

      • obj: T

        The object to freeze

      • Optionaloptions: { skip?: WeakSet<object> }

        Optional configuration

        • Optionalskip?: WeakSet<object>

          Externally owned WeakSet of objects to skip during freezing; not mutated by this function (caller responsible for lifecycle)

      Returns Secure<T>

      The frozen object with Secure<T> type

      • Internally maintains a seen WeakSet to track visited objects and prevent infinite recursion
      • The skip parameter is an opt-out mechanism for caller-controlled exclusions
      • Symbol sym.$Extensible objects are always skipped
    • Deep-freeze an Array | Object to make it immutable (with recursion guard).

      Type Parameters

      • const T extends object

      Parameters

      • obj: T

        The object to freeze

      • Optionaloptions: { skip?: WeakSet<object> }

        Optional configuration

        • Optionalskip?: WeakSet<object>

          Externally owned WeakSet of objects to skip during freezing; not mutated by this function (caller responsible for lifecycle)

      • Optionalseen: WeakSet<object>

      Returns Secure<T>

      The frozen object with Secure<T> type

      • Internally maintains a seen WeakSet to track visited objects and prevent infinite recursion
      • The skip parameter is an opt-out mechanism for caller-controlled exclusions
      • Symbol sym.$Extensible objects are always skipped