Skip to content

Commit 0744e1b

Browse files
jessetrinityDanielRosenwasser
authored andcommitted
fix(40640) add missing notApplicableReason in protocol (#40680)
* update protocol * fix lint error
1 parent fee3bfb commit 0744e1b

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

src/server/protocol.ts

+7
Original file line numberDiff line numberDiff line change
@@ -617,6 +617,12 @@ namespace ts.server.protocol {
617617
* so this description should make sense by itself if the parent is inlineable=true
618618
*/
619619
description: string;
620+
621+
/**
622+
* A message to show to the user if the refactoring cannot be applied in
623+
* the current context.
624+
*/
625+
notApplicableReason?: string;
620626
}
621627

622628
export interface GetEditsForRefactorRequest extends Request {
@@ -3217,6 +3223,7 @@ namespace ts.server.protocol {
32173223
readonly allowTextChangesInNewFiles?: boolean;
32183224
readonly lazyConfiguredProjectsFromExternalProject?: boolean;
32193225
readonly providePrefixAndSuffixTextForRename?: boolean;
3226+
readonly provideRefactorNotApplicableReason?: boolean;
32203227
readonly allowRenameOfImportPath?: boolean;
32213228
readonly includePackageJsonAutoImports?: "auto" | "on" | "off";
32223229
}

tests/baselines/reference/api/tsserverlibrary.d.ts

+6
Original file line numberDiff line numberDiff line change
@@ -6881,6 +6881,11 @@ declare namespace ts.server.protocol {
68816881
* so this description should make sense by itself if the parent is inlineable=true
68826882
*/
68836883
description: string;
6884+
/**
6885+
* A message to show to the user if the refactoring cannot be applied in
6886+
* the current context.
6887+
*/
6888+
notApplicableReason?: string;
68846889
}
68856890
interface GetEditsForRefactorRequest extends Request {
68866891
command: CommandTypes.GetEditsForRefactor;
@@ -8902,6 +8907,7 @@ declare namespace ts.server.protocol {
89028907
readonly allowTextChangesInNewFiles?: boolean;
89038908
readonly lazyConfiguredProjectsFromExternalProject?: boolean;
89048909
readonly providePrefixAndSuffixTextForRename?: boolean;
8910+
readonly provideRefactorNotApplicableReason?: boolean;
89058911
readonly allowRenameOfImportPath?: boolean;
89068912
readonly includePackageJsonAutoImports?: "auto" | "on" | "off";
89078913
}

0 commit comments

Comments
 (0)