feat(language-service): implement signature help (#41581)

This commit implements signature help in the Language Service, on top of
TypeScript's implementation within the TCB.

A separate PR adds support for translation of signature help data from TS'
API to the LSP in the Language Service extension.

PR Close #41581
This commit is contained in:
Alex Rickabaugh
2021-04-12 11:10:03 -04:00
committed by Zach Arend
parent d85e74e05c
commit c7f9516ab9
8 changed files with 323 additions and 1 deletions
@@ -144,6 +144,11 @@ export enum PerfPhase {
*/
LsComponentLocations,
/**
* Time spent by the Angular Language Service calculating signature help.
*/
LsSignatureHelp,
/**
* Tracks the number of `PerfPhase`s, and must appear at the end of the list.
*/
@@ -69,7 +69,9 @@ class AstTranslator implements AstVisitor {
// The `EmptyExpr` doesn't have a dedicated method on `AstVisitor`, so it's special cased here.
if (ast instanceof EmptyExpr) {
return UNDEFINED;
const res = ts.factory.createIdentifier('undefined');
addParseSpanInfo(res, ast.sourceSpan);
return res;
}
// First attempt to let any custom resolution logic provide a translation for the given node.