Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
visitDirective(ast: DirectiveAst, context: any): any {
// Override the default child visitor to ignore the host properties of a directive.
if (ast.inputs && ast.inputs.length) {
templateVisitAll(this, ast.inputs, context);
}
}
function getTemplateExpressionDiagnostics(info) {
var visitor = new ExpressionDiagnosticsVisitor(info, function (path, includeEvent) {
return getExpressionScope(info, path, includeEvent);
});
compiler_1.templateVisitAll(visitor, info.templateAst);
return visitor.diagnostics;
}
exports.getTemplateExpressionDiagnostics = getTemplateExpressionDiagnostics;
function getTemplateExpressionDiagnostics(info) {
var visitor = new ExpressionDiagnosticsVisitor(info, function (path, includeEvent) {
return getExpressionScope(info, path, includeEvent);
});
compiler_1.templateVisitAll(visitor, info.templateAst);
return visitor.diagnostics;
}
exports.getTemplateExpressionDiagnostics = getTemplateExpressionDiagnostics;
var visitor = new (function (_super) {
__extends(class_1, _super);
function class_1() {
return _super !== null && _super.apply(this, arguments) || this;
}
class_1.prototype.visitEmbeddedTemplate = function (ast, context) {
_super.prototype.visitEmbeddedTemplate.call(this, ast, context);
processReferences(ast.references);
};
class_1.prototype.visitElement = function (ast, context) {
_super.prototype.visitElement.call(this, ast, context);
processReferences(ast.references);
};
return class_1;
}(compiler_1.RecursiveTemplateAstVisitor));
compiler_1.templateVisitAll(visitor, info.templateAst);
return result;
}
function getDefintionOf(info, ast) {
export function getTemplateExpressionDiagnostics(info: DiagnosticTemplateInfo): Diagnostic[] {
const visitor = new ExpressionDiagnosticsVisitor(
info, (path: TemplateAstPath, includeEvent: boolean) =>
getExpressionScope(info, path, includeEvent));
templateVisitAll(visitor, info.templateAst);
return visitor.diagnostics;
}
var visitor = new /** @class */ (function (_super) {
tslib_1.__extends(class_1, _super);
function class_1() {
return _super !== null && _super.apply(this, arguments) || this;
}
class_1.prototype.visitEmbeddedTemplate = function (ast, context) {
_super.prototype.visitEmbeddedTemplate.call(this, ast, context);
processReferences(ast.references);
};
class_1.prototype.visitElement = function (ast, context) {
_super.prototype.visitElement.call(this, ast, context);
processReferences(ast.references);
};
return class_1;
}(compiler_1.RecursiveTemplateAstVisitor));
compiler_1.templateVisitAll(visitor, info.templateAst);
return result;
}
function getDefinitionOf(info, ast) {
function visit(children: T[] | undefined) {
if (children && children.length) results.push(templateVisitAll(visitor, children, context));
}
cb(visit);
var visitor = new (function (_super) {
__extends(class_1, _super);
function class_1() {
return _super !== null && _super.apply(this, arguments) || this;
}
class_1.prototype.visitEmbeddedTemplate = function (ast, context) {
_super.prototype.visitEmbeddedTemplate.call(this, ast, context);
processReferences(ast.references);
};
class_1.prototype.visitElement = function (ast, context) {
_super.prototype.visitElement.call(this, ast, context);
processReferences(ast.references);
};
return class_1;
}(compiler_1.RecursiveTemplateAstVisitor));
compiler_1.templateVisitAll(visitor, info.templateAst);
return result;
}
function getDefinitionOf(info, ast) {
Ng2Walker.prototype.visitNg2TemplateHelper = function (roots, context, baseStart) {
var _this = this;
if (!roots || !roots.length) {
return;
}
else {
var sourceFile = this.getContextSourceFile(context.template.url, context.template.template.source);
var referenceVisitor = new referenceCollectorVisitor_1.ReferenceCollectorVisitor();
var visitor = new this._config.templateVisitorCtrl(sourceFile, this._originalOptions, context, baseStart, this._config.expressionVisitorCtrl);
compiler.templateVisitAll(referenceVisitor, roots, null);
visitor._variables = referenceVisitor.variables;
compiler.templateVisitAll(visitor, roots, context.controller);
visitor.getFailures().forEach(function (f) { return _this.addFailure(f); });
}
};
Ng2Walker.prototype.visitNg2StyleHelper = function (style, context, styleMetadata, baseStart) {