Skip to content

Commit ce338a4

Browse files
authored
fix(40640) add missing notApplicableReason in protocol (microsoft#40680)
* update protocol * fix lint error
1 parent 614b5e3 commit ce338a4

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 {
@@ -3223,6 +3229,7 @@ namespace ts.server.protocol {
32233229
readonly allowTextChangesInNewFiles?: boolean;
32243230
readonly lazyConfiguredProjectsFromExternalProject?: boolean;
32253231
readonly providePrefixAndSuffixTextForRename?: boolean;
3232+
readonly provideRefactorNotApplicableReason?: boolean;
32263233
readonly allowRenameOfImportPath?: boolean;
32273234
readonly includePackageJsonAutoImports?: "auto" | "on" | "off";
32283235
}

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

+6
Original file line numberDiff line numberDiff line change
@@ -6956,6 +6956,11 @@ declare namespace ts.server.protocol {
69566956
* so this description should make sense by itself if the parent is inlineable=true
69576957
*/
69586958
description: string;
6959+
/**
6960+
* A message to show to the user if the refactoring cannot be applied in
6961+
* the current context.
6962+
*/
6963+
notApplicableReason?: string;
69596964
}
69606965
interface GetEditsForRefactorRequest extends Request {
69616966
command: CommandTypes.GetEditsForRefactor;
@@ -8983,6 +8988,7 @@ declare namespace ts.server.protocol {
89838988
readonly allowTextChangesInNewFiles?: boolean;
89848989
readonly lazyConfiguredProjectsFromExternalProject?: boolean;
89858990
readonly providePrefixAndSuffixTextForRename?: boolean;
8991+
readonly provideRefactorNotApplicableReason?: boolean;
89868992
readonly allowRenameOfImportPath?: boolean;
89878993
readonly includePackageJsonAutoImports?: "auto" | "on" | "off";
89888994
}

0 commit comments

Comments
 (0)