@sensimods/utility-lab
    Preparing search index...

    Function deepFreeze

    • Recursively applies Object.freeze to an object and all of its nested properties. Includes protection against circular references.

      Type Parameters

      • T extends object

      Parameters

      • obj: T

        The object to freeze.

      • seen: WeakSet<object> = ...

        (Internal) WeakSet to track visited objects for circular references.

      Returns DeepReadonly<T>

      The original object, now strictly frozen and typed as DeepReadonly.