fix(language-service): Insert parentheses for method completion (#33860)

This commit leverages the `insertText` field in `ts.CompletionEntry` to
return a completion text for class methods that includes parentheses.

PR closes https://github.com/angular/vscode-ng-language-service/issues/15

PR Close #33860
This commit is contained in:
Keen Yee Liau
2019-11-15 12:06:00 -08:00
committed by Miško Hevery
parent c60d7563a8
commit dd944ef73f
4 changed files with 102 additions and 44 deletions

View File

@ -442,6 +442,7 @@ class ExpressionVisitor extends NullTemplateVisitor {
name: s.name,
kind: s.kind as ng.CompletionKind,
sortText: s.name,
insertText: s.callable ? `${s.name}()` : s.name,
});
}
}