Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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