reducedProperty
function
Creates an aggregate property that reduces its individual values into an accumulated value using
the given reduce
and getInitial
functions.
API
function reducedProperty<TAcc, TItem>(
reduce: (acc: TAcc, item: TItem) => TAcc,
getInitial: () => TAcc,
): AggregateProperty<TAcc, TItem>;
reducedProperty
AggregateProperty<TAcc, TItem>
Creates an aggregate property 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.
@paramgetInitial
() => TAcc
A function that gets the initial value for the reduce operation.
@returns
AggregateProperty<TAcc, TItem>
Jump to details