當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript jQuery.isFunction函數代碼示例

本文整理匯總了TypeScript中jQuery.isFunction函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript isFunction函數的具體用法?TypeScript isFunction怎麽用?TypeScript isFunction使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了isFunction函數的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: parse

  static parse(rawInput, calendar) {
    let rawProps

    // normalize raw input
    if ($.isFunction(rawInput.events)) { // extended form
      rawProps = rawInput
    } else if ($.isFunction(rawInput)) { // short form
      rawProps = { events: rawInput }
    }

    if (rawProps) {
      return EventSource.parse.call(this, rawProps, calendar)
    }

    return false
  }
開發者ID:caseyjhol,項目名稱:fullcalendar,代碼行數:16,代碼來源:FuncEventSource.ts

示例2: function

 pendingf = function () {
     var exe = $.Deferred();
     var cd = closure();
     if (!cd || !$.isFunction(cd.always)) {
         throw "Return value of wrapped function must be a deferred";
     }
     cd = cd.always(function () { exe.resolve(); });
     pipeDeferred(cd, d);
     return exe;
 };
開發者ID:hraban,項目名稱:lush,代碼行數:10,代碼來源:utils.ts

示例3: applyAll

export function applyAll(functions, thisObj, args) {
  if ($.isFunction(functions)) {
    functions = [ functions ]
  }
  if (functions) {
    let i
    let ret
    for (i = 0; i < functions.length; i++) {
      ret = functions[i].apply(thisObj, args) || ret
    }
    return ret
  }
}
開發者ID:enhazappe,項目名稱:fullcalendar,代碼行數:13,代碼來源:util.ts

示例4: object

  this.each(function(i, _element) { // loop each DOM element involved
    let element = $(_element)
    let calendar = element.data('fullCalendar') // get the existing calendar object (if any)
    let singleRes // the returned value of this single method call

    // a method call
    if (typeof options === 'string') {

      if (options === 'getCalendar') {
        if (!i) { // first element only
          res = calendar
        }
      } else if (options === 'destroy') { // don't warn if no calendar object
        if (calendar) {
          calendar.destroy()
          element.removeData('fullCalendar')
        }
      } else if (!calendar) {
        warn('Attempting to call a FullCalendar method on an element with no calendar.')
      } else if ($.isFunction(calendar[options])) {
        singleRes = calendar[options].apply(calendar, args)

        if (!i) {
          res = singleRes // record the first method call result
        }
        if (options === 'destroy') { // for the destroy method, must remove Calendar object data
          element.removeData('fullCalendar')
        }
      } else {
        warn("'" + options + "' is an unknown FullCalendar method.")
      }
    } else if (!calendar) { // don't initialize twice
      calendar = new Calendar(element, options)
      element.data('fullCalendar', calendar)
      calendar.render()
    }
  })
開發者ID:caseyjhol,項目名稱:fullcalendar,代碼行數:37,代碼來源:main.ts

示例5: isPromise

function isPromise(x: any) {
    return x !== undefined && $.isFunction(x.then);
}
開發者ID:hraban,項目名稱:lush,代碼行數:3,代碼來源:utils.ts


注:本文中的jQuery.isFunction函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。