Function getMapWithDefault

  • Like key => map[key] || fallback() but for Map.

    Type Parameters

    • K

    • V

    Parameters

    • map: Map<K, V>

      the target map

    • fallback: (() => V)

      value if missing in the map

        • (): V
        • Returns V

    Returns ((key) => V)

    a getter into the map

      • (key): V
      • Parameters

        • key: K

        Returns V

Generated using TypeDoc