ts-data-forge
    Preparing search index...

    Function castMutable

    • Casts a readonly type T to its Mutable<T> equivalent.

      ⚠️ Safety Warning: This is a type assertion that bypasses TypeScript's immutability guarantees. The runtime value remains unchanged - only the type system's view of it changes. Use with caution as it can lead to unexpected mutations of data that was intended to be immutable.

      Type Parameters

      • T

        The type of the readonly value

      Parameters

      • readonlyValue: T

        The readonly value to cast to mutable

      Returns Mutable<T>

      The same value with readonly modifiers removed from its type

      • castDeepMutable - For deeply nested readonly structures
      • castReadonly - For the opposite operation