Updater<T, R>: ((previous) => R)

A function that takes a previous value of type T and returns an updated value of the same type. Used for updating values in certain data structures or scenarios.

Type Parameters

  • T

    The type of the value being updated.

  • R = T

Type declaration

    • (previous): R
    • Parameters

      • previous: T

        The previous value to be updated.

      Returns R

Returns

  • The updated value.