Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
dm.outputs.forEach(function (propName) {
if (collection_1.ListWrapper.contains(outputs, propName)) {
throw new exceptions_1.BaseException("Output event '" + propName + "' defined multiple times in '" + lang_1.stringify(directiveType) + "'");
}
});
mergedOutputs = collection_1.ListWrapper.concat(dm.outputs, outputs);
compileInHost(componentType) {
var metadatas = reflector.annotations(componentType);
var hostViewFactory = metadatas.find(isHostViewFactory);
if (isBlank(hostViewFactory)) {
throw new BaseException(`No precompiled component ${stringify(componentType)} found`);
}
return PromiseWrapper.resolve(new HostViewFactoryRef_(hostViewFactory));
}
clearCache() { }
var removals = [];
var record;
for (record = this._mapHead; record !== null; record = record._next) {
collection_1.ListWrapper.push(items, lang_1.stringify(record));
}
for (record = this._previousMapHead; record !== null; record = record._nextPrevious) {
collection_1.ListWrapper.push(previous, lang_1.stringify(record));
}
for (record = this._changesHead; record !== null; record = record._nextChanged) {
collection_1.ListWrapper.push(changes, lang_1.stringify(record));
}
for (record = this._additionsHead; record !== null; record = record._nextAdded) {
collection_1.ListWrapper.push(additions, lang_1.stringify(record));
}
for (record = this._removalsHead; record !== null; record = record._nextRemoved) {
collection_1.ListWrapper.push(removals, lang_1.stringify(record));
}
return "map: " + items.join(', ') + "\n" + "previous: " + previous.join(', ') + "\n" +
"additions: " + additions.join(', ') + "\n" + "changes: " + changes.join(', ') + "\n" +
"removals: " + removals.join(', ') + "\n";
};
KeyValueChanges.prototype._forEach = function (obj, fn) {
for (var j = 0; j < annotation.length; j++) {
paramAnnotations.push(extractAnnotation(annotation[j]));
}
}
else if (lang_1.isFunction(annotation)) {
paramAnnotations.push(extractAnnotation(annotation));
}
else {
paramAnnotations.push(annotation);
}
}
Reflect.defineMetadata('parameters', paramsAnnotations, fn);
return fn;
}
else {
throw new Error("Only Function or Array is supported in Class definition for key '" + key + "' is '" + lang_1.stringify(fnOrArray) + "'");
}
}
function Class(clsDef) {
toString() {
return this.previousIndex === this.currentIndex ?
stringify(this.item) :
stringify(this.item) + '[' + stringify(this.previousIndex) + '->' +
stringify(this.currentIndex) + ']';
}
}
collection_1.ListWrapper.forEach(dirBinding.resolvedHostInjectables, function (b) {
if (collection_1.MapWrapper.contains(visitedIds, b.key.id)) {
throw new lang_1.BaseException("Multiple directives defined the same host injectable: \"" + lang_1.stringify(b.key.token) + "\"");
}
collection_1.MapWrapper.set(visitedIds, b.key.id, true);
collection_1.ListWrapper.push(bd, ProtoElementInjector._createBindingData(firstBindingIsComponent, dirBinding, dirBindings, ProtoElementInjector._createBinding(b)));
});
});
RuntimeMetadataResolver.prototype.getPipeMetadata = function (pipeType) {
var meta = this._pipeCache.get(pipeType);
if (lang_1.isBlank(meta)) {
var pipeMeta = this._pipeResolver.resolve(pipeType);
var moduleUrl = reflection_1.reflector.importUri(pipeType);
meta = new cpl.CompilePipeMetadata({
type: new cpl.CompileTypeMetadata({ name: lang_1.stringify(pipeType), moduleUrl: moduleUrl, runtime: pipeType }),
name: pipeMeta.name,
pure: pipeMeta.pure
});
this._pipeCache.set(pipeType, meta);
}
return meta;
};
RuntimeMetadataResolver.prototype.getViewDirectivesMetadata = function (component) {
KeyValueChangeRecord.prototype.toString = function () {
return lang_1.looseIdentical(this.previousValue, this.currentValue) ?
lang_1.stringify(this.key) :
(lang_1.stringify(this.key) + '[' + lang_1.stringify(this.previousValue) + '->' +
lang_1.stringify(this.currentValue) + ']');
};
return KeyValueChangeRecord;
var tokenStrs = reversed.map(function (k) { return lang_1.stringify(k.token); });
return " (" + tokenStrs.join(' -> ') + ")";
_throwMixingViewAndComponent(propertyName, component) {
throw new BaseException(`Component '${stringify(component)}' cannot have both '${propertyName}' and '@View' set at the same time"`);
}
};