Interface IDictionary<T>

Базовый контейнер для хранения ключ/значения.

Type Parameters

  • T = unknown

Hierarchy

Implemented by

Properties

[toStringTag]: string

Событие, вызываемое при добавлении/удалении объектов в хранилище.

ignoreCase: boolean

Флаг, указывающий на то, что для доступа к элементам регистр ключа игнорируется.

mapEnhancer: null | IMapEnhancer<T, unknown>

Объект, позволяющий обрабатывать значения, добавляемые в объект-хранилище.

observable: boolean

Флаг, включающий уведомления об изменении объектов.

size: number

Returns

the number of elements in the Map.

Methods

  • Returns an iterable of entries in the map.

    Returns IterableIterator<[string, T]>

  • Returns void

  • Создает новый объект, который является копией текущего экземпляра.

    Returns IDictionary<T>

  • Returns

    true if an element in the Map existed and has been removed, or false if the element does not exist.

    Parameters

    • key: string

    Returns boolean

  • Вызывает функции очистки всех внутренних ресурсов конейтенера.

    Returns void

  • Returns an iterable of key, value pairs for every entry in the map.

    Returns IterableIterator<[string, T]>

  • Executes a provided function once per each key/value pair in the Map, in insertion order.

    Parameters

    • callbackfn: ((value: T, key: string, map: Map<string, T>) => void)
        • (value: T, key: string, map: Map<string, T>): void
        • Parameters

          • value: T
          • key: string
          • map: Map<string, T>

          Returns void

    • Optional thisArg: any

    Returns void

  • Returns a specified element from the Map object. If the value that is associated to the provided key is an object, then you will get a reference to that object and any change made to that object will effectively modify it inside the Map.

    Returns

    Returns the element associated with the specified key. If no element is associated with the specified key, undefined is returned.

    Parameters

    • key: string

    Returns undefined | T

  • Returns

    boolean indicating whether an element with the specified key exists or not.

    Parameters

    • key: string

    Returns boolean

  • Returns an iterable of keys in the map

    Returns IterableIterator<string>

  • Удаляет значение из хранилища по ключу.

    Returns

    true, если значение было найдено и удалено из хранилища; false, если значение не удалось найти.

    Remarks

    Аналогичен методу StorageMap.delete.

    Parameters

    • key: string

      Ключ, по которому требуется удалить значение.

    Returns boolean

  • Заменяет все значения в контейнере на новые.

    Parameters

    • items: Iterable<readonly [string, T]>

      Значения, которые будут добавлены в контейнер.

    Returns void

  • Adds a new element with a specified key and value to the Map. If an element with the same key already exists, the element will be updated.

    Parameters

    • key: string
    • value: T

    Returns IDictionary<T>

  • Возвращает значение, полученное по ключу key, или undefined, если значение отсутствует.

    Returns

    Значение, полученное по ключу key, или undefined, если значение отсутствует.

    Parameters

    • key: string

      Ключ, по которому требуется найти значение.

    Returns undefined | T

  • Type Parameters

    • T

    Parameters

    • key: string

    Returns undefined | T

  • Returns an iterable of values in the map

    Returns IterableIterator<T>

Generated using TypeDoc