diff --git a/packages/language-service/src/completions.ts b/packages/language-service/src/completions.ts index d11daae031..6d73641e9f 100644 --- a/packages/language-service/src/completions.ts +++ b/packages/language-service/src/completions.ts @@ -28,7 +28,7 @@ const hiddenHtmlElements = { link: true, }; -const ANGULAR_PSEUDO_ELEMENTS = ['ng-container', 'ng-content', 'ng-template'] as const ; +const ANGULAR_ELEMENTS: ReadonlyArray = ['ng-container', 'ng-content', 'ng-template'] as const ; export function getTemplateCompletions( templateInfo: AstResult, position: number): ts.CompletionEntry[] { @@ -244,18 +244,18 @@ function elementCompletions(info: AstResult, path: AstPath): ts.Complet sortText: name, }; }); - const pseudoElements = ANGULAR_PSEUDO_ELEMENTS.map(name => { + const angularElements = ANGULAR_ELEMENTS.map(name => { return { name, // Need to cast to unknown because Angular's CompletionKind includes HTML // entites. - kind: CompletionKind.PSEUDO_ELEMENT as unknown as ts.ScriptElementKind, + kind: CompletionKind.ANGULAR_ELEMENT as unknown as ts.ScriptElementKind, sortText: name, }; }); // Return components and html elements - return uniqueByName([...htmlElements, ...components, ...pseudoElements]); + return uniqueByName([...htmlElements, ...components, ...angularElements]); } /** diff --git a/packages/language-service/src/types.ts b/packages/language-service/src/types.ts index ba8453563f..15e62a3ad4 100644 --- a/packages/language-service/src/types.ts +++ b/packages/language-service/src/types.ts @@ -274,7 +274,7 @@ export enum CompletionKind { REFERENCE = 'reference', TYPE = 'type', VARIABLE = 'variable', - PSEUDO_ELEMENT = 'pseudo element' + ANGULAR_ELEMENT = 'angular element' } /**