Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "deepFreeze"

Index

Functions

Functions

deepFreeze

  • deepFreeze<K, V>(a: Map<K, V>): ReadonlyMap<K, V>
  • deepFreeze<T>(a: Set<T>): ReadonlySet<T>
  • deepFreeze<T>(a: Array<T>): ReadonlyArray<T>
  • deepFreeze<T>(f: T): T
  • deepFreeze<T>(o: T): Readonly<T>
  • Prevents the modification of existing property attributes and values, and prevents the addition of new properties.

    Type parameters

    • K

    • V

    Parameters

    • a: Map<K, V>

    Returns ReadonlyMap<K, V>

    the frozen object

  • Prevents the modification of existing property attributes and values, and prevents the addition of new properties.

    Type parameters

    • T

    Parameters

    • a: Set<T>

    Returns ReadonlySet<T>

    the frozen object

  • Prevents the modification of existing property attributes and values, and prevents the addition of new properties.

    Type parameters

    • T

    Parameters

    • a: Array<T>

    Returns ReadonlyArray<T>

    the frozen object

  • Prevents the modification of existing property attributes and values, and prevents the addition of new properties.

    Type parameters

    • T: Function

    Parameters

    • f: T

    Returns T

    the frozen object

  • Prevents the modification of existing property attributes and values, and prevents the addition of new properties.

    Type parameters

    • T

    Parameters

    • o: T

      Object on which to lock the attributes

    Returns Readonly<T>

    the frozen object