• Type Parameters

    Type Parameters

    • V

    Parameters

    • array: readonly V[]
    • index: number
    • producer: ((index: number) => V)
        • (index: number): V
        • Parameters

          • index: number

          Returns V

    • Optional useCountBack: boolean

    Returns V

  • Returns the value associated with the given key. Returns the result of the producer function if the key is not present in the map. The map won't be updated with the computed value, see computeIfAbsent instead.

    See

    Type Parameters

    Type Parameters

    • K

    • V

    Parameters

    • map: PickMap<K, V, "get" | "has">

      a map

    • key: K

      the queried key

    • producer: ((key: K) => V)

      the function to produce a fallback value

        • (key: K): V
        • Parameters

          • key: K

          Returns V

    Returns V

  • Type Parameters

    Type Parameters

    • K extends string | number | symbol

    • V

    Parameters

    • record: Readonly<Record<any, V>>
    • key: K
    • producer: ((key: K) => V)
        • (key: K): V
        • Parameters

          • key: K

          Returns V

    Returns V

Generated using TypeDoc