Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Immutability

Hierarchy

  • Immutability

Index

Methods

Methods

Static freeze

  • freeze<T>(obj: T, excluded?: Set<any>): Readonly<T>
  • Deep-freezes an object

    Type parameters

    • T

    Parameters

    • obj: T

      The object to freeze

    • Optional excluded: Set<any>

      For internal use, used to avoid infinite recursion, when a parent object is references in one of its children

    Returns Readonly<T>

Static unfreeze

  • unfreeze<T>(obj: Readonly<T>): T

Generated using TypeDoc