Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function interpolationCompletions(info, position) {
// Look for an interpolation in at the position.
var templatePath = utils_1.findTemplateAstAt(info.templateAst, position);
var mostSpecific = templatePath.tail;
if (mostSpecific) {
var visitor = new ExpressionVisitor(info, position, undefined, function () { return language_services_1.getExpressionScope(utils_1.diagnosticInfoFromTemplateInfo(info), templatePath, false); });
mostSpecific.visit(visitor, null);
return utils_1.uniqueByName(visitor.result);
}
}
// There is a special case of HTML where text that contains a unclosed tag is treated as
function elementCompletions(info, path) {
var htmlNames = html_info_1.elementNames().filter(function (name) { return !(name in hiddenHtmlElements); });
// Collect the elements referenced by the selectors
var directiveElements = utils_1.getSelectors(info)
.selectors.map(function (selector) { return selector.element; })
.filter(function (name) { return !!name; });
var components = directiveElements.map(function (name) { return ({ kind: 'component', name: name, sort: name }); });
var htmlElements = htmlNames.map(function (name) { return ({ kind: 'element', name: name, sort: name }); });
// Return components and html elements
return utils_1.uniqueByName(htmlElements.concat(components));
}
function entityCompletions(value, position) {