mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-22 12:03:44 -05:00
Hierarchical refactorings (#41975)
* add hierarchical refactoring strings * fourslash tests * extractSymbol filters returned actions * move refactorKind check to utilities * rename parameters * messaging for addOrRemoveBracesToArrowFunction * fix up inferFunctionReturnType * fix up convertArrowFunctionOrFunctionExpression * add preferences to fourslash method * fix up convert string * fix up moveToNewFile * fix lint errors * remove extra arrow braces diagnostics * break out tests * add refactor helpers * refactor refactors * keep list of actions * address PR comments * response protocol * address more comments
This commit is contained in:
@@ -566,7 +566,8 @@ namespace ts.server.protocol {
|
||||
arguments: GetApplicableRefactorsRequestArgs;
|
||||
}
|
||||
export type GetApplicableRefactorsRequestArgs = FileLocationOrRangeRequestArgs & {
|
||||
triggerReason?: RefactorTriggerReason
|
||||
triggerReason?: RefactorTriggerReason;
|
||||
kind?: string;
|
||||
};
|
||||
|
||||
export type RefactorTriggerReason = "implicit" | "invoked";
|
||||
@@ -626,6 +627,11 @@ namespace ts.server.protocol {
|
||||
* the current context.
|
||||
*/
|
||||
notApplicableReason?: string;
|
||||
|
||||
/**
|
||||
* The hierarchical dotted name of the refactor action.
|
||||
*/
|
||||
kind?: string;
|
||||
}
|
||||
|
||||
export interface GetEditsForRefactorRequest extends Request {
|
||||
|
||||
Reference in New Issue
Block a user