fix(language-service): Do not override TS LS methods not supported by VE NgLS (#42727)

Historically, our Language Service was built with the potential to be a
drop-in replacement for the TypeScript Language Service with the added
benefit of being able to provide Angular-specific information as well.
While our VSCode extension does not use the Language Service in this
way, it appears that other community-contributed plugins do. We don't
really officially support this use-case but there's not real reason for
us to override the TypeScript Language Service's
implementation in the VE Angular Language Service so that it returns
`undefined`. As with other non-implemented methods, we can just allow
this to be deferred to TSLS.

fixes #42715

PR Close #42727
This commit is contained in:
Andrew Scott 2021-06-30 15:30:48 -07:00 committed by atscott
parent 74350a5cf1
commit ffeea63f43
1 changed files with 0 additions and 28 deletions

View File

@ -119,30 +119,6 @@ export function create(info: tss.server.PluginCreateInfo): NgLanguageService {
return ngLS.getDefinitionAndBoundSpan(fileName, position);
}
function getTypeDefinitionAtPosition(fileName: string, position: number) {
// Not implemented in VE Language Service
return undefined;
}
function getReferencesAtPosition(fileName: string, position: number) {
// Not implemented in VE Language Service
return undefined;
}
function findRenameLocations(
fileName: string, position: number, findInStrings: boolean, findInComments: boolean,
providePrefixAndSuffixTextForRename?: boolean): readonly ts.RenameLocation[]|undefined {
// not implemented in VE Language Service
return undefined;
}
function getSignatureHelpItems(
fileName: string, position: number,
options: ts.SignatureHelpItemsOptions|undefined): ts.SignatureHelpItems|undefined {
// not implemented in VE Language Service
return undefined;
}
function getTcb(fileName: string, position: number) {
// Not implemented in VE Language Service
return undefined;
@ -162,10 +138,6 @@ export function create(info: tss.server.PluginCreateInfo): NgLanguageService {
getSemanticDiagnostics,
getDefinitionAtPosition,
getDefinitionAndBoundSpan,
getTypeDefinitionAtPosition,
getReferencesAtPosition,
getSignatureHelpItems,
findRenameLocations,
getTcb,
getComponentLocationsForTemplate,
};