docs: function makeCancelable(df, options) {
          var extendOptions;
          var cancel;
          if ("function" === typeof options) {
              cancel = options;
          }
          else {
              extendOptions = options;
              if (extendOptions && extendOptions.cancelCallback) {
                  cancel = extendOptions.cancelCallback;
              }
              else {
                  cancel = function () { };
              }
          }
          var _abort = function (info) {
              var originalMessage = (info && info.message) ? info.message : undefined;
              var detail = info ? $.extend({}, info, { message: "abort", originalMessage: originalMessage }) : { message: "abort" };
              cancel(detail);
              if (null != this.dependency) {
                  if (this.dependency.abort) {
                      this.dependency.abort(detail);
                  }
                  else {
                      console.error(TAG + "[call] dependency object doesn't have 'abort()' method.");
                  }
                  if (this.callReject && "pending" === this.state()) {
                      df.reject(detail);
                  }
              }
              else if ("pending" === this.state()) {
                  df.reject(detail);
              }
          };
          var _dependOn = function (promise) {
              var _this = this;
              if (promise.abort) {
                  this.dependency = promise;
                  promise
                      .always(function () {
                      _this.dependency = null;
                  });
              }
              else {
                  console.error(TAG + "[set] dependency object doesn't have 'abort()' method.");
              }
              return promise;
          };
          var _target = $.extend({}, {
              dependency: null,
              callReject: false,
          }, extendOptions);
          return {
              df: df,
              target: _target,
              abort: _abort,
              dependOn: _dependOn,
          };
      }