Disable move to file in TS versions < 5.2 (#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
This commit is contained in:
Matt Bierner 2023-05-31 13:18:24 -07:00 committed by GitHub
parent 2959f41a1a
commit 14977db0ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View file

@ -480,7 +480,7 @@ class TypeScriptRefactorProvider implements vscode.CodeActionProvider<TsCodeActi
...typeConverters.Range.toFileRangeRequestArgs(file, rangeOrSelection),
triggerReason: this.toTsTriggerReason(context),
kind: context.only?.value,
includeInteractiveActions: true,
includeInteractiveActions: this.client.apiVersion.gte(API.v520),
};
return this.client.execute('getApplicableRefactors', args, token);
});

View file

@ -35,6 +35,7 @@ export class API {
public static readonly v480 = API.fromSimpleString('4.8.0');
public static readonly v490 = API.fromSimpleString('4.9.0');
public static readonly v510 = API.fromSimpleString('5.1.0');
public static readonly v520 = API.fromSimpleString('5.2.0');
public static fromVersionString(versionString: string): API {
let version = semver.valid(versionString);