Class Collection<T>Abstract

Abstract Collection type

Type Parameters

  • T

Hierarchy

Constructors

Methods

  • Iterable of key, value pairs in the map

    Returns

    Iterable

    Returns IterableIterator<[string, T]>

  • Filter the collection by a given predicate

    Parameters

    • predicate: ((value: T, key: string) => boolean)

      Predicate to satisfy

        • (value: T, key: string): boolean
        • Parameters

          • value: T
          • key: string

          Returns boolean

    Returns T[]

  • Find some value based on a predicate

    Parameters

    • predicate: ((value: T, key: string) => boolean)

      Predicate to satisfy

        • (value: T, key: string): boolean
        • Parameters

          • value: T
          • key: string

          Returns boolean

    Returns undefined | T

  • Execute a provided function over each key, value pair in the map

    Parameters

    • cb: ((value: T, key: string, map: ReactiveMap<string, T>) => void)

      Callback for each pair

        • (value: T, key: string, map: ReactiveMap<string, T>): void
        • Parameters

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

          Returns void

    Returns void

  • Check whether an id exists in the Collection

    Returns

    Whether it exists

    Parameters

    • id: string

      Id

    Returns boolean

  • Map the collection using a given callback

    Type Parameters

    • O

    Parameters

    • cb: ((value: T, key: string) => O)

      Callback

        • (value: T, key: string): O
        • Parameters

          • value: T
          • key: string

          Returns O

    Returns O[]

Generated using TypeDoc