Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface CacheProvider<K, V>

Type parameters

  • K

  • V

Hierarchy

Implemented by

Index

Properties

[toStringTag]: string
size: number

Methods

  • [iterator](): IterableIterator<[K, V]>
  • Returns an iterable of entries in the map.

    Returns IterableIterator<[K, V]>

  • clear(): void
  • Returns void

  • delete(key: K): boolean
  • Parameters

    • key: K

    Returns boolean

  • entries(): IterableIterator<[K, V]>
  • Returns an iterable of key, value pairs for every entry in the map.

    Returns IterableIterator<[K, V]>

  • forEach(callbackfn: (value: V, key: K, map: Map<K, V>) => void, thisArg?: any): void
  • Parameters

    • callbackfn: (value: V, key: K, map: Map<K, V>) => void
        • (value: V, key: K, map: Map<K, V>): void
        • Parameters

          • value: V
          • key: K
          • map: Map<K, V>

          Returns void

    • Optional thisArg: any

    Returns void

  • get(key: K): V
  • Parameters

    • key: K

    Returns V

  • get cache or create it on necessary

    Type parameters

    • R

    Parameters

    Returns R

  • has(key: K): boolean
  • Parameters

    • key: K

    Returns boolean

  • keys(): IterableIterator<K>
  • Returns an iterable of keys in the map

    Returns IterableIterator<K>

  • Parameters

    • key: K
    • value: V

    Returns CacheProvider<K, V>

  • values(): IterableIterator<V>
  • Returns an iterable of values in the map

    Returns IterableIterator<V>