Options
All
  • Public
  • Public/Protected
  • All
Menu

map-get-or-set

Index

Type aliases

Functions

Type aliases

GetFallback

GetFallback<V>: () => V

Type parameters

  • V

Type declaration

    • (): V
    • Returns V

Functions

Const mapGetOrSet

  • mapGetOrSet<K, V>(map: Map<K, V>, key: K, getFallback: GetFallback<V>): V
  • Gets a value for a given key in a map, setting the fallback value if it doesn't exist.

    Type parameters

    • K

    • V

    Parameters

    Returns V

Generated using TypeDoc