Type alias WatchCallback<V, OV>

WatchCallback<V, OV>: ((value: V, oldValue: OV) => CleanupFn | void)

Type Parameters

  • V = any

  • OV = any

Type declaration

    • (value: V, oldValue: OV): CleanupFn | void
    • A callback function to be executed when a watch is triggered. This function receives the new and old value of the watch values and may return a clean up function.

      Parameters

      • value: V
      • oldValue: OV

      Returns CleanupFn | void

Generated using TypeDoc