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);
|
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 {
|
return {
|
||||||
...tsLS,
|
...tsLS,
|
||||||
getSemanticDiagnostics,
|
getSemanticDiagnostics,
|
||||||
|
@ -68,5 +75,6 @@ export function create(info: ts.server.PluginCreateInfo): ts.LanguageService {
|
||||||
getQuickInfoAtPosition,
|
getQuickInfoAtPosition,
|
||||||
getDefinitionAndBoundSpan,
|
getDefinitionAndBoundSpan,
|
||||||
getReferencesAtPosition,
|
getReferencesAtPosition,
|
||||||
|
findRenameLocations,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -128,6 +128,13 @@ export function create(info: tss.server.PluginCreateInfo): tss.LanguageService {
|
||||||
return undefined;
|
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 {
|
return {
|
||||||
// First clone the original TS language service
|
// First clone the original TS language service
|
||||||
...tsLS,
|
...tsLS,
|
||||||
|
@ -139,5 +146,6 @@ export function create(info: tss.server.PluginCreateInfo): tss.LanguageService {
|
||||||
getDefinitionAndBoundSpan,
|
getDefinitionAndBoundSpan,
|
||||||
getTypeDefinitionAtPosition,
|
getTypeDefinitionAtPosition,
|
||||||
getReferencesAtPosition,
|
getReferencesAtPosition,
|
||||||
|
findRenameLocations,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue