Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
_visitAll(asts) {
var res = ListWrapper.createFixedSize(asts.length);
for (var i = 0; i < asts.length; ++i) {
res[i] = asts[i].visit(this);
}
return res;
}
/**
visitAll(asts: any[]): any[] {
var res = ListWrapper.createFixedSize(asts.length);
for (var i = 0; i < asts.length; ++i) {
res[i] = asts[i].visit(this);
}
return res;
}
visitAll(asts) {
var res = ListWrapper.createFixedSize(asts.length);
for (var i = 0; i < asts.length; ++i) {
res[i] = asts[i].visit(this);
}
return res;
}
visitChain(ast) { this.simple = false; }
hydrate() {
if (this.hydrated)
throw new BaseException('The view is already hydrated.');
this.hydrated = true;
this.globalEventRemovers = ListWrapper.createFixedSize(this.globalEventAdders.length);
for (var i = 0; i < this.globalEventAdders.length; i++) {
this.globalEventRemovers[i] = this.globalEventAdders[i]();
}
}
dehydrate() {
constructor(_records, _eventBindings, _directiveRecords, _utilName) {
this._records = _records;
this._eventBindings = _eventBindings;
this._directiveRecords = _directiveRecords;
this._utilName = _utilName;
/** @internal */
this._sanitizedEventNames = new Map();
this._sanitizedNames = ListWrapper.createFixedSize(this._records.length + 1);
this._sanitizedNames[CONTEXT_INDEX] = CONTEXT_ACCESSOR;
for (var i = 0, iLen = this._records.length; i < iLen; ++i) {
this._sanitizedNames[i + 1] = sanitizeName(`${this._records[i].name}${i}`);
}
for (var ebIndex = 0; ebIndex < _eventBindings.length; ++ebIndex) {
var eb = _eventBindings[ebIndex];
var names = [CONTEXT_ACCESSOR];
for (var i = 0, iLen = eb.records.length; i < iLen; ++i) {
names.push(sanitizeName(`${eb.records[i].name}${i}_${ebIndex}`));
}
this._sanitizedEventNames.set(eb, names);
}
}
/** @internal */
_instantiateProvider(provider, visibility) {
if (provider.multiProvider) {
var res = ListWrapper.createFixedSize(provider.resolvedFactories.length);
for (var i = 0; i < provider.resolvedFactories.length; ++i) {
res[i] = this._instantiate(provider, provider.resolvedFactories[i], visibility);
}
return res;
}
else {
return this._instantiate(provider, provider.resolvedFactories[0], visibility);
}
}
_instantiate(provider, resolvedFactory, visibility) {
_processEventBinding(eb, locals) {
var values = ListWrapper.createFixedSize(eb.records.length);
values[0] = this.values[0];
for (var protoIdx = 0; protoIdx < eb.records.length; ++protoIdx) {
var proto = eb.records[protoIdx];
if (proto.isSkipRecord()) {
protoIdx += this._computeSkipLength(protoIdx, proto, values);
}
else {
if (proto.lastInBinding) {
this._markPathAsCheckOnce(proto);
}
var res = this._calculateCurrValue(proto, values, locals);
if (proto.lastInBinding) {
return res;
}
else {
this._writeSelf(proto, res, values);
export function coalesce(srcRecords: ProtoRecord[]): ProtoRecord[] {
let dstRecords = [];
let excludedIdxs = [];
let indexMap: Map = new Map();
let skipDepth = 0;
let skipSources: ProtoRecord[] = ListWrapper.createFixedSize(srcRecords.length);
for (let protoIndex = 0; protoIndex < srcRecords.length; protoIndex++) {
let skipRecord = skipSources[protoIndex];
if (isPresent(skipRecord)) {
skipDepth--;
skipRecord.fixedArgs[0] = dstRecords.length;
}
let src = srcRecords[protoIndex];
let dst = _cloneAndUpdateIndexes(src, dstRecords, indexMap);
if (dst.isSkipRecord()) {
dstRecords.push(dst);
skipDepth++;
skipSources[dst.fixedArgs[0]] = dst;
} else {
childNodesAsList(el) {
var childNodes = el.childNodes;
var res = ListWrapper.createFixedSize(childNodes.length);
for (var i = 0; i < childNodes.length; i++) {
res[i] = childNodes[i];
}
return res;
}
clearNodes(el) {
constructor(renderNode, appEl, component) {
this.renderNode = renderNode;
this.appEl = appEl;
this.component = component;
if (isPresent(component)) {
this.contentNodesByNgContentIndex =
ListWrapper.createFixedSize(component.template.ngContentSelectors.length);
for (var i = 0; i < this.contentNodesByNgContentIndex.length; i++) {
this.contentNodesByNgContentIndex[i] = [];
}
}
else {
this.contentNodesByNgContentIndex = null;
}
}
addContentNode(ngContentIndex, nodeExpr) {