Class SymbolWeakMap<V>

Type Parameters

  • V

Constructors

Methods

Constructors

Methods

  • return the value in the cache by the key

    Parameters

    • symbol: Symbol

      the key for access

    Returns undefined | V

    the value in the cache by the key

  • return the boolean value whether it have the key or not

    Parameters

    • symbol: Symbol

      the key for access

    Returns boolean

    Whether it have the key or not.

  • set key and value

    Parameters

    • symbol: Symbol

      the key for access

    • value: V

      the value as a cache item

    Returns boolean

    true: succeed to set value, false: not set (already exists)