本文整理匯總了TypeScript中@utils/refs._Array_slice類的典型用法代碼示例。如果您正苦於以下問題:TypeScript _Array_slice類的具體用法?TypeScript _Array_slice怎麽用?TypeScript _Array_slice使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了_Array_slice類的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: expression_createListener
return expression_createListener(function(){
let value = expression_eval(expr, model, ctx, ctr);
let args = _Array_slice.call(arguments);
args[0] = value == null ? '' : value;
fn.apply(this, args);
});
示例2: compo_create
export function compo_create(arguments_: any[]) {
var argLength = arguments_.length,
Proto = arguments_[argLength - 1],
Ctor,
hasBase;
if (argLength > 1)
hasBase = compo_inherit(
Proto,
_Array_slice.call(arguments_, 0, argLength - 1)
);
if (Proto == null) Proto = {};
var include = _resolve_External('include');
if (include != null) Proto.__resource = include.url;
compo_prepairProperties(Proto);
Ctor = Proto.hasOwnProperty('constructor') ? Proto.constructor : null;
Ctor = compo_createConstructor(Ctor, Proto, hasBase);
obj_extendDefaults(Proto, CompoProto);
Ctor.prototype = Proto;
Proto = null;
return Ctor;
}
示例3: getFnNodes
function getFnNodes(nodes) {
if (nodes == null) {
return null;
}
var imax = nodes.length,
i = -1,
arr,
decoStart = -1;
while (++i < imax) {
var node = nodes[i];
if (node.type === Dom.DECORATOR) {
var start = i;
i = Decorator.goToNode(nodes, i, imax);
node = nodes[i];
if (isFn(node.tagName) === false) {
continue;
}
node.decorators = _Array_slice.call(nodes, start, i);
}
if (isFn(node.tagName) === false || node.fn != null) {
continue;
}
if (arr == null) arr = [];
arr.push(node);
}
return arr;
}
示例4: function
subscribe: function(compo, observable /* ...args */){
var args = _Array_slice.call(arguments, 2);
if (observable.subscribe == null) {
console.warn('Expects `IObservable` instance with subscribe/unsubscribe methods');
return;
}
var result = observable.apply(observable, args);
if (observable.unsubscribe == null && (result == null || result.dispose == null)) {
throw Error('Invalid subscription: don`t know how to unsubscribe');
}
compo_attach(compo, 'dispose', function(){
if (observable == null) {
return;
}
if (result && result.dispose) {
result.dispose();
result = null;
observable = null;
return;
}
if (observable.unsubscribe) {
observable.unsubscribe(args[0]);
observable = null;
result = null;
}
});
}
示例5: emit
emit(signal, a?, b?, c?){
var controllers = _collection[this.name],
name = this.name,
args = _Array_slice.call(arguments, 1);
if (controllers == null) {
//if DEBUG
log_warn('Pipe.emit: No signals were bound to:', name);
//endif
return;
}
var i = controllers.length,
called = false;
while (--i !== -1) {
var ctr = controllers[i];
var slots = ctr.pipes[name];
if (slots == null)
continue;
var slot = slots[signal];
if (slot != null) {
slot.apply(ctr, args);
called = true;
}
}
// if DEBUG
if (called === false)
log_warn('Pipe `%s` has not slots for `%s`', name, signal);
// endif
}
示例6: function
return function () {
var args = _Array_slice.call(arguments),
imax = fns.length,
i = -1;
while (++i < imax) {
fns[i].apply(this, args);
}
};
示例7: function
return function(){
if (++locks > 1) {
locks = 0;
log_warn('<listener:expression> concurrent binder');
return;
}
callback.apply(this, _Array_slice.call(arguments));
locks--;
}
示例8: function
return function(event) {
var args;
if (arguments.length > 1) {
args = _Array_slice.call(arguments, 1);
}
if (expr != null) {
var arr = expression_evalStatements(expr, ctr.model, null, ctr);
args = args == null ? arr : args.concat(arr);
}
_fire(ctr, slot, event, args, -1);
};
示例9: function
return function() {
var args = _Array_slice.call(arguments);
if (beforeInvoke != null) {
var overridenArgs = beforeInvoke.apply(this, args);
if (is_Array(overridenArgs)) {
args = overridenArgs;
}
}
var result = innerFn.apply(this, args);
if (afterInvoke != null) {
var overridenResult = afterInvoke.call(this, result);
if (overridenResult !== void 0) result = overridenResult;
}
return result;
};