Skip to content

Commit 14977db

Browse files
authored
Disable move to file in TS versions < 5.2 (microsoft#183992)
There are still a few key bugs with refactoring. We will ship this as a preview for TS 5.2+ instead of for 5.1
1 parent 2959f41 commit 14977db

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

extensions/typescript-language-features/src/languageFeatures/refactor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ class TypeScriptRefactorProvider implements vscode.CodeActionProvider<TsCodeActi
480480
...typeConverters.Range.toFileRangeRequestArgs(file, rangeOrSelection),
481481
triggerReason: this.toTsTriggerReason(context),
482482
kind: context.only?.value,
483-
includeInteractiveActions: true,
483+
includeInteractiveActions: this.client.apiVersion.gte(API.v520),
484484
};
485485
return this.client.execute('getApplicableRefactors', args, token);
486486
});

extensions/typescript-language-features/src/tsServer/api.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ export class API {
3535
public static readonly v480 = API.fromSimpleString('4.8.0');
3636
public static readonly v490 = API.fromSimpleString('4.9.0');
3737
public static readonly v510 = API.fromSimpleString('5.1.0');
38+
public static readonly v520 = API.fromSimpleString('5.2.0');
3839

3940
public static fromVersionString(versionString: string): API {
4041
let version = semver.valid(versionString);

0 commit comments

Comments
 (0)