@vcmap/core
    Preparing search index...

    Class FlightCollection

    A collection of flights. Provides playFlight API, which returns a FlightPlayer. Emits playerChanged event, whenever another flight is played.

    Hierarchy (View Summary)

    Index

    Accessors

    • get uniqueKey(): keyof T | undefined

      The key by which to check uniqueness against. undefined if no uniqueness constraint is set.

      Returns keyof T | undefined

    Constructors

    Methods

    • Returns an item identified by the unique constraint key. Returns null, if there is no uniqueness constraint.

      Parameters

      • value: unknown

        the value to test against. does a shallow comparison, if the passed a non-atomic value

      Returns FlightInstance | undefined

    • Returns true, if the key exists. Returns undefined, if there is no uniqueness constraint.

      Parameters

      • value: unknown

      Returns boolean | undefined

    • Creates a Collection from an iterable, such as an Array.

      Type Parameters

      • F

      Parameters

      • iterable: Iterable<F>
      • OptionaluniqueKey: false | keyof F

        a key to maintain uniquely within the collection. passing false disables uniqueness.

      Returns Collection<F>

    Properties

    _array: FlightInstance[]

    Event raised if an item is added. Is passed the added item.

    playerChanged: VcsEvent<FlightPlayer | undefined>

    Event raised if an item is removed. Is passed the removed item.