js-util

Home > rc-js-util > fpMaybeNewValue

fpMaybeNewValue() function

Returns the newValue if defined, else the old value.

Signature:

export declare function fpMaybeNewValue<TValue>(newValue: TValue | null | undefined, oldValue: TValue): TValue;

Parameters

Parameter Type Description
newValue TValue | null | undefined  
oldValue TValue  

Returns:

TValue

Remarks

See fpMaybeNewValue().