Interactive refactor actions (#53915)

This commit is contained in:
Andrew Branch
2023-04-19 13:01:28 -07:00
committed by GitHub
parent c58231ea3b
commit 7bf0337428
6 changed files with 69 additions and 8 deletions

View File

@@ -586,6 +586,14 @@ export interface GetApplicableRefactorsRequest extends Request {
export type GetApplicableRefactorsRequestArgs = FileLocationOrRangeRequestArgs & {
triggerReason?: RefactorTriggerReason;
kind?: string;
/**
* Include refactor actions that require additional arguments to be passed when
* calling 'GetEditsForRefactor'. When true, clients should inspect the
* `isInteractive` property of each returned `RefactorActionInfo`
* and ensure they are able to collect the appropriate arguments for any
* interactive refactor before offering it.
*/
includeInteractiveActions?: boolean;
};
export type RefactorTriggerReason = "implicit" | "invoked";
@@ -650,6 +658,12 @@ export interface RefactorActionInfo {
* The hierarchical dotted name of the refactor action.
*/
kind?: string;
/**
* Indicates that the action requires additional arguments to be passed
* when calling 'GetEditsForRefactor'.
*/
isInteractive?: boolean;
}
export interface GetEditsForRefactorRequest extends Request {