A function that takes a previous value of type T (or undefined if not present) and returns an upserted value of the same type. Used for inserting or updating values in certain data structures or scenarios.
The type of the value being upserted.
The previous value to be upserted or undefined if not present.
A function that takes a previous value of type T (or undefined if not present) and returns an upserted value of the same type. Used for inserting or updating values in certain data structures or scenarios.