Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "dictionary/with-dictionary-entry"

Index

Functions

withDictionaryEntry

  • Create a new dictionary as a clone of the original with the specified item added or replaced. Useful when manipulating immutable objects e.g. in the redux store.

    Type parameters

    • T

    Parameters

    • items: Dictionary<T>

      The source dictionary.

    • key: string

      The key of the item to add or replace.

    • value: T

      The value to add or replace.

    Returns Dictionary<T>

    A new dictionary with the changed item.

Generated using TypeDoc