refactor(language-service): create findRenameLocations stubs (#39919)
Create stubs for `findRenameLocations` for both VE and Ivy Language Service implementations. This will prevent failed requests when it is implemented on the vscode plugin side. PR Close #39919
This commit is contained in:
parent
5a3a154cd8
commit
dd18cfd983
|
@ -61,6 +61,13 @@ export function create(info: ts.server.PluginCreateInfo): ts.LanguageService {
|
|||
return ngLS.getReferencesAtPosition(fileName, position);
|
||||
}
|
||||
|
||||
function findRenameLocations(
|
||||
fileName: string, position: number, findInStrings: boolean, findInComments: boolean,
|
||||
providePrefixAndSuffixTextForRename?: boolean): readonly ts.RenameLocation[]|undefined {
|
||||
// TODO(atscott): implement
|
||||
return undefined;
|
||||
}
|
||||
|
||||
return {
|
||||
...tsLS,
|
||||
getSemanticDiagnostics,
|
||||
|
@ -68,5 +75,6 @@ export function create(info: ts.server.PluginCreateInfo): ts.LanguageService {
|
|||
getQuickInfoAtPosition,
|
||||
getDefinitionAndBoundSpan,
|
||||
getReferencesAtPosition,
|
||||
findRenameLocations,
|
||||
};
|
||||
}
|
||||
|
|
|
@ -128,6 +128,13 @@ export function create(info: tss.server.PluginCreateInfo): tss.LanguageService {
|
|||
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;
|
||||
}
|
||||
|
||||
return {
|
||||
// First clone the original TS language service
|
||||
...tsLS,
|
||||
|
@ -139,5 +146,6 @@ export function create(info: tss.server.PluginCreateInfo): tss.LanguageService {
|
|||
getDefinitionAndBoundSpan,
|
||||
getTypeDefinitionAtPosition,
|
||||
getReferencesAtPosition,
|
||||
findRenameLocations,
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue