Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var report = function (message, span) {
results.push({
kind: types_1.DiagnosticKind.Error,
span: span || declaration.declarationSpan, message: message
});
};
try {
var parseResult = parser.tryParseHtml(htmlResult, metadata, directives, pipes, schemas);
result = {
htmlAst: htmlResult.rootNodes,
templateAst: parseResult.templateAst,
directive: metadata, directives: directives, pipes: pipes,
parseErrors: parseResult.errors, expressionParser: expressionParser, errors: errors
};
}
}
}
catch (e) {
var span = template.span;
if (e.fileName == contextFile) {
span = template.query.getSpanAt(e.line, e.column) || span;
}
result = { errors: [{ kind: types_1.DiagnosticKind.Error, message: e.message, span: span }] };
}
return result || {};
};
return LanguageServiceImpl;