Class MapWithDefault<K, V>

Type Parameters

  • K
  • V

Hierarchy

Constructors

Properties

Methods

Constructors

Properties

createDefault: (() => V)

Type declaration

    • (): V
    • Returns V

Methods

  • Returns the value if the key already exists. If not, it creates a new value under that key using the ctor callback and returns it.

    Parameters

    • key: K

    Returns V

Generated using TypeDoc