refactor: create CompletionKind.PSEUDO_ELEMENT (#31248)

PR Close #31248
This commit is contained in:
Suguru Inatomi 2019-09-21 20:02:07 +01:00 committed by Matias Niemelä
parent 692535a935
commit 251a512222
2 changed files with 3 additions and 2 deletions

View File

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

View File

@ -274,6 +274,7 @@ export enum CompletionKind {
REFERENCE = 'reference',
TYPE = 'type',
VARIABLE = 'variable',
PSEUDO_ELEMENT = 'pseudo element'
}
/**