本文整理汇总了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;未经允许,请勿转载。 |
请发表评论