• Overview
@angular/forms/signals

reducedMetadataKey

function

Creates an AggregateMetadataKey that reduces its individual values into an accumulated value using the given reduce and getInitial functions.

API

function reducedMetadataKey<TAcc, TItem>(  reduce: (acc: TAcc, item: TItem) => TAcc,  getInitial: NoInfer<() => TAcc>,): AggregateMetadataKey<TAcc, TItem>;

reducedMetadataKey

Creates an AggregateMetadataKey that reduces its individual values into an accumulated value using the given reduce and getInitial functions.

@paramreduce(acc: TAcc, item: TItem) => TAcc

The reducer function.

@paramgetInitialNoInfer<() => TAcc>

A function that gets the initial value for the reduce operation.

@returnsAggregateMetadataKey<TAcc, TItem>
Jump to details