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: () => TAcc,
): AggregateMetadataKey<TAcc, TItem>;reducedMetadataKey
AggregateMetadataKey<TAcc, TItem>Creates an AggregateMetadataKey that reduces its individual values into an accumulated
value using the given reduce and getInitial functions.
@paramreduce
(acc: TAcc, item: TItem) => TAccThe reducer function.
@paramgetInitial
() => TAccA function that gets the initial value for the reduce operation.
@returns
AggregateMetadataKey<TAcc, TItem>Jump to details