refactor(language-service): Return ts.CompletionInfo for getCompletionsAt() (#32116)
Part 3/3 of language-service refactoring: Change all language service APIs to return TS value since Angular LS will be a proper tsserver plugin. This reduces the need to transform results among Angular <--> TS <--> LSP. PR Close #32116
This commit is contained in:

committed by
Andrew Kushnir

parent
d6bbc4d76d
commit
5a562d8a0a
@ -498,3 +498,12 @@ function expandedAttr(attr: AttrInfo): AttrInfo[] {
|
||||
function lowerName(name: string): string {
|
||||
return name && (name[0].toLowerCase() + name.substr(1));
|
||||
}
|
||||
|
||||
export function ngCompletionToTsCompletionEntry(completion: Completion): ts.CompletionEntry {
|
||||
return {
|
||||
name: completion.name,
|
||||
kind: completion.kind as ts.ScriptElementKind,
|
||||
kindModifiers: '',
|
||||
sortText: completion.sort,
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user