map.apps Bundle APIs 4.20.0
    Preparing search index...
    • Builds function which delays the synchronization for given msec and cancels the execution if transformer is triggered again. In contrast to debounceOrCancel this method ensures that after the given delay at least one update is performed.

      Parameters

      • delay: number

        time in msec to wait before synchronizing.

      • Optionalcallback: ConvertFunction

        callback which transforms the value.

      Returns ConvertFunction

      transformer function.

      let a = new Clazz({prop: 2});
      let b = new Clazz();
      Binding.for(a, b)
      .syncToRight("prop",
      deferOrCancel(100)
      ).enable().syncToRightNow();
      b.prop // is undefined but will be set after 100msec to 2