refactor: create CompletionKind.PSEUDO_ELEMENT (#31248)
PR Close #31248
This commit is contained in:
parent
692535a935
commit
251a512222
@ -28,7 +28,7 @@ const hiddenHtmlElements = {
|
|||||||
link: true,
|
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(
|
export function getTemplateCompletions(
|
||||||
templateInfo: AstResult, position: number): ts.CompletionEntry[] {
|
templateInfo: AstResult, position: number): ts.CompletionEntry[] {
|
||||||
@ -249,7 +249,7 @@ function elementCompletions(info: AstResult, path: AstPath<HtmlAst>): ts.Complet
|
|||||||
name,
|
name,
|
||||||
// Need to cast to unknown because Angular's CompletionKind includes HTML
|
// Need to cast to unknown because Angular's CompletionKind includes HTML
|
||||||
// entites.
|
// entites.
|
||||||
kind: CompletionKind.COMPONENT as unknown as ts.ScriptElementKind,
|
kind: CompletionKind.PSEUDO_ELEMENT as unknown as ts.ScriptElementKind,
|
||||||
sortText: name,
|
sortText: name,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
@ -274,6 +274,7 @@ export enum CompletionKind {
|
|||||||
REFERENCE = 'reference',
|
REFERENCE = 'reference',
|
||||||
TYPE = 'type',
|
TYPE = 'type',
|
||||||
VARIABLE = 'variable',
|
VARIABLE = 'variable',
|
||||||
|
PSEUDO_ELEMENT = 'pseudo element'
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user