Skip to main content

Function: mapReducer()

Returns a Reducer or OptionalReducer equivalent to reducer except its final value is transformed using fn.

Since

v2.0.0

Call Signature

mapReducer<Value, Acc, From, To, This>(fn, reducer): Reducer<Value, Acc, To>

Type Parameters

Value

Acc

From

To

This

Parameters

fn

(value) => To

reducer

Readonly<RawReducerWithFinish<Value, Acc, From, This>>

Returns

Reducer<Value, Acc, To>

Defined in

reducers.d.ts:458

Call Signature

mapReducer<From, To>(fn): <Value, Acc, This>(reducer) => Reducer<Value, Acc, To>

Type Parameters

From

To

Parameters

fn

(value) => To

Returns

Function

Type Parameters

Value

Acc

This

Parameters

reducer

Readonly<RawReducerWithFinish<Value, Acc, From, This>>

Returns

Reducer<Value, Acc, To>

Defined in

reducers.d.ts:462

Call Signature

mapReducer<Value, From, To, This>(fn, reducer): Reducer<Value, To, To>

Type Parameters

Value

From

To

This

Parameters

fn

(value) => To

reducer

Readonly<RawReducerWithoutFinish<Value, From, This>>

Returns

Reducer<Value, To, To>

Defined in

reducers.d.ts:468

Call Signature

mapReducer<From, To>(fn): <Value, This>(reducer) => Reducer<Value, To, To>

Type Parameters

From

To

Parameters

fn

(value) => To

Returns

Function

Type Parameters

Value

This

Parameters

reducer

Readonly<RawReducerWithoutFinish<Value, From, This>>

Returns

Reducer<Value, To, To>

Defined in

reducers.d.ts:472

Call Signature

mapReducer<Value, From, To, This>(fn, reducer): OptionalReducer<Value, To>

Type Parameters

Value

From

To

This

Parameters

fn

(value) => To

reducer

Readonly<RawOptionalReducerWithFinish<Value, From, This>>

Returns

OptionalReducer<Value, To>

Defined in

reducers.d.ts:478

Call Signature

mapReducer<From, To>(fn): <Value, This>(reducer) => OptionalReducer<Value, To>

Type Parameters

From

To

Parameters

fn

(value) => To

Returns

Function

Type Parameters

Value

This

Parameters

reducer

Readonly<RawOptionalReducerWithFinish<Value, From, This>>

Returns

OptionalReducer<Value, To>

Defined in

reducers.d.ts:482

Call Signature

mapReducer<From, To, This>(fn, reducer): OptionalReducer<To, To>

Type Parameters

From

To

This

Parameters

fn

(value) => To

reducer

Readonly<RawOptionalReducerWithoutFinish<From, This>>

Returns

OptionalReducer<To, To>

Defined in

reducers.d.ts:488

Call Signature

mapReducer<From, To>(fn): <This>(reducer) => OptionalReducer<To, To>

Type Parameters

From

To

Parameters

fn

(value) => To

Returns

Function

Type Parameters

This

Parameters

reducer

Readonly<RawOptionalReducerWithoutFinish<From, This>>

Returns

OptionalReducer<To, To>

Defined in

reducers.d.ts:492

Call Signature

mapReducer<From, To>(fn, reducer): OptionalReducer<To, To>

Type Parameters

From

To

Parameters

fn

(value) => To

reducer

FunctionReducer<From>

Returns

OptionalReducer<To, To>

Defined in

reducers.d.ts:498

Call Signature

mapReducer<From, To>(fn): (reducer) => OptionalReducer<To, To>

Type Parameters

From

To

Parameters

fn

(value) => To

Returns

Function

Parameters

reducer

FunctionReducer<From>

Returns

OptionalReducer<To, To>

Defined in

reducers.d.ts:502