add trigger reason to protocol

This commit is contained in:
Jesse Trinity
2020-04-14 13:17:19 -07:00
parent d45f0d0c9f
commit bac046573f
5 changed files with 25 additions and 9 deletions

View File

@@ -546,7 +546,15 @@ namespace ts.server.protocol {
command: CommandTypes.GetApplicableRefactors;
arguments: GetApplicableRefactorsRequestArgs;
}
export type GetApplicableRefactorsRequestArgs = FileLocationOrRangeRequestArgs;
export type GetApplicableRefactorsRequestArgs = FileLocationOrRangeRequestArgs & {
triggerReason?: RefactorTriggerReason;
};
export type RefactorTriggerReason = RefactorInvokedReason;
export interface RefactorInvokedReason {
kind: 'invoked';
}
/**
* Response is a list of available refactorings.