Skip to content

Commit 97c18f4

Browse files
committed
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
1 parent df5cc1f commit 97c18f4

File tree

1 file changed

+0
-28
lines changed

1 file changed

+0
-28
lines changed

packages/language-service/src/ts_plugin.ts

-28
Original file line numberDiff line numberDiff line change
@@ -119,30 +119,6 @@ export function create(info: tss.server.PluginCreateInfo): NgLanguageService {
119119
return ngLS.getDefinitionAndBoundSpan(fileName, position);
120120
}
121121

122-
function getTypeDefinitionAtPosition(fileName: string, position: number) {
123-
// Not implemented in VE Language Service
124-
return undefined;
125-
}
126-
127-
function getReferencesAtPosition(fileName: string, position: number) {
128-
// Not implemented in VE Language Service
129-
return undefined;
130-
}
131-
132-
function findRenameLocations(
133-
fileName: string, position: number, findInStrings: boolean, findInComments: boolean,
134-
providePrefixAndSuffixTextForRename?: boolean): readonly ts.RenameLocation[]|undefined {
135-
// not implemented in VE Language Service
136-
return undefined;
137-
}
138-
139-
function getSignatureHelpItems(
140-
fileName: string, position: number,
141-
options: ts.SignatureHelpItemsOptions|undefined): ts.SignatureHelpItems|undefined {
142-
// not implemented in VE Language Service
143-
return undefined;
144-
}
145-
146122
function getTcb(fileName: string, position: number) {
147123
// Not implemented in VE Language Service
148124
return undefined;
@@ -162,10 +138,6 @@ export function create(info: tss.server.PluginCreateInfo): NgLanguageService {
162138
getSemanticDiagnostics,
163139
getDefinitionAtPosition,
164140
getDefinitionAndBoundSpan,
165-
getTypeDefinitionAtPosition,
166-
getReferencesAtPosition,
167-
getSignatureHelpItems,
168-
findRenameLocations,
169141
getTcb,
170142
getComponentLocationsForTemplate,
171143
};

0 commit comments

Comments
 (0)