IReadOnlyObservableCollection.map - Andrei15193/react-model-view-viewmodel GitHub Wiki

Creates a new JavaScript Array constructed by mapping each item in the collection.

map<TResult, TContext>(
  callback: (this: TContext, item: TItem, index: number, collection: this) => TResult,
  thisArg?: TContext
): TResult[]

Source reference: src/collections/observableCollections/IReadOnlyObservableCollection.ts:184.

Generic Parameters

  • TResult - The type to map each item to.

  • TContext - The context type in which the callback is executed.

Parameters

  • callback: (this:TContext, item:TItem, index:number, collection:this) => TResult
    The callback mapping each item.

  • thisArg: TContext
    A value to use as the callback context when mapping items.

Returns: TResult[]

A new Array containing the mapped items.

See also

⚠️ **GitHub.com Fallback** ⚠️