DoneJS StealJS jQuery ++ FuncUnit DocumentJS
3.0.0
2.3.27

 

  • Github
  • Twitter
  • Chat
  • Forum
  • Guides
  • Core
    • can-component
    • can-compute
      • computeSettings
      • compute
    • can-connect
    • can-define
    • can-define/list/list
    • can-define/map/map
    • can-route
    • can-route-pushstate
    • can-set
    • can-stache
    • can-stache/helpers/route
    • can-stache-bindings
  • Ecosystem
  • Infrastructure
  • Legacy
  • Bitovi
    • Bitovi.com
    • Blog
    • Consulting
    • Training
    • Open Source
  • Chat
  • Forum
  • Star
  • Follow @canjs
  • CanJS
  • /
  • Core
  • /
  • can-compute
  • /
  • asyncComputer
  • / On this page
    • asyncComputer

      typedef

      A function that determines a value for an async compute.

      • source

      function(lastSetValue, setVal)

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

      Parameters

      1. lastSetValue {*}:

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

      2. setVal {function(newVal)}:

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

      Returns

      {*}:

      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.

      CanJS is part of DoneJS. Created and maintained by the core DoneJS team and Bitovi. Currently 3.0.0.