refactor: make pseudo elements array readonly (#31248)

PR Close #31248
This commit is contained in:
Suguru Inatomi 2019-09-21 07:47:52 +01:00 committed by Matias Niemelä
parent 7c64b8d3fd
commit 692535a935
1 changed files with 2 additions and 2 deletions

View File

@ -28,7 +28,7 @@ const hiddenHtmlElements = {
link: true,
};
const angularPseudoElements = ['ng-container', 'ng-content', 'ng-template'];
const ANGULAR_PSEUDO_ELEMENTS = ['ng-container', 'ng-content', 'ng-template'] as const;
export function getTemplateCompletions(
templateInfo: AstResult, position: number): ts.CompletionEntry[] {
@ -244,7 +244,7 @@ function elementCompletions(info: AstResult, path: AstPath<HtmlAst>): ts.Complet
sortText: name,
};
});
const pseudoElements = angularPseudoElements.map(name => {
const pseudoElements = ANGULAR_PSEUDO_ELEMENTS.map(name => {
return {
name,
// Need to cast to unknown because Angular's CompletionKind includes HTML