• typedef

{function(lastSetValue, setVal)}


A function that determines a value for an async compute.

function(lastSetValue, setVal)

The function callback to can.compute.async that determines the value of the compute.


  1. lastSetValue {*}Optional

    The last set value of the compute. This should be returned if you are doing an in-place compute.

  2. setVal {function(newVal)}Optional

    Called to update the value of the compute at a later time.



If a setVal argument is not provided, the return value is set as the current value of the compute. If setVal is provided and undefined is returned, the current value remains until setVal is called.