Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release-4.0] Cherry-pick notApplicableReason property addition from #40680 #40688

Merged
merged 1 commit into from Sep 22, 2020
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/server/protocol.ts
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
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