Class EntityCollection<E, K>

Represents a collection of Entity objects on the "many" end of a relationship.

Type Parameters

  • E extends Entity
  • K extends keyof E = keyof E

Implements

  • Iterable<E>

Constructors

Properties

map: EntityCollectionMap<E> = ...

Accessors

Methods

  • Returns a new iterator object that yields the values for each element in the EntityCollection in insertion order.

    Returns Iterator<E, any, undefined>

  • Copies the elements of the EntityCollection to an Array, starting at a particular Array index.

    Parameters

    • array: E[]
    • index: number

    Returns E[]

  • Calls callbackFn once for each Entity present in the EntityCollection, in insertion order. If a thisArg parameter is provided to forEach, it will be used as the this value for each callback.

    Parameters

    • callbackfn: ((entity: E) => void)
        • (entity): void
        • Parameters

          • entity: E

          Returns void

    • OptionalthisArg: unknown

    Returns void