Skip to content

Commit

Permalink
fix(40640) add missing notApplicableReason in protocol (#40680) (#40688)
Browse files Browse the repository at this point in the history
* update protocol

* fix lint error

Co-authored-by: Jesse Trinity <[email protected]>
  • Loading branch information
DanielRosenwasser and jessetrinity authored Sep 22, 2020
1 parent fee3bfb commit e9d8ccb
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/server/protocol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -617,6 +617,12 @@ namespace ts.server.protocol {
* so this description should make sense by itself if the parent is inlineable=true
*/
description: string;

/**
* A message to show to the user if the refactoring cannot be applied in
* the current context.
*/
notApplicableReason?: string;
}

export interface GetEditsForRefactorRequest extends Request {
Expand Down Expand Up @@ -3217,6 +3223,7 @@ namespace ts.server.protocol {
readonly allowTextChangesInNewFiles?: boolean;
readonly lazyConfiguredProjectsFromExternalProject?: boolean;
readonly providePrefixAndSuffixTextForRename?: boolean;
readonly provideRefactorNotApplicableReason?: boolean;
readonly allowRenameOfImportPath?: boolean;
readonly includePackageJsonAutoImports?: "auto" | "on" | "off";
}
Expand Down
6 changes: 6 additions & 0 deletions tests/baselines/reference/api/tsserverlibrary.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6881,6 +6881,11 @@ declare namespace ts.server.protocol {
* so this description should make sense by itself if the parent is inlineable=true
*/
description: string;
/**
* A message to show to the user if the refactoring cannot be applied in
* the current context.
*/
notApplicableReason?: string;
}
interface GetEditsForRefactorRequest extends Request {
command: CommandTypes.GetEditsForRefactor;
Expand Down Expand Up @@ -8902,6 +8907,7 @@ declare namespace ts.server.protocol {
readonly allowTextChangesInNewFiles?: boolean;
readonly lazyConfiguredProjectsFromExternalProject?: boolean;
readonly providePrefixAndSuffixTextForRename?: boolean;
readonly provideRefactorNotApplicableReason?: boolean;
readonly allowRenameOfImportPath?: boolean;
readonly includePackageJsonAutoImports?: "auto" | "on" | "off";
}
Expand Down

0 comments on commit e9d8ccb

Please sign in to comment.