Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Mapping<Source, Target>

Keeps an array of result objects synchronized with an array of source objects. See Working with arrays.

Mapping provides a map function that updates its results. The map function can be called multiple times and the results will get created, removed and updated accordingly. A Mapping can be used to keep an array of components (objects with a renderMaquette method) synchronized with an array of data. Instances of Mapping can be created using createMapping.

Type parameters

  • Source

    The type of source elements. Usually the data type.

  • Target

    The type of target elements. Usually the component type.

Hierarchy

  • Mapping

Index

Properties

Methods

Properties

results

results: Array<Target>

The array of results. These results will be synchronized with the latest array of sources that were provided using map.

Methods

map

  • map(newSources: Array<Source>): void
  • Maps a new array of sources and updates results.

    Parameters

    • newSources: Array<Source>

      The new array of sources.

    Returns void

Generated using TypeDoc