Skip to content

Commit cd896ba

Browse files
committed
Disable implementations code lens for TS < 2.2.1 Fixes microsoft#23120
1 parent 8cb7fd2 commit cd896ba

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

extensions/typescript/src/features/implementationsCodeLensProvider.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@ export default class TypeScriptImplementationsCodeLensProvider extends TypeScrip
2222
super(client, 'implementationsCodeLens.enabled');
2323
}
2424

25+
provideCodeLenses(document: TextDocument, token: CancellationToken): Promise<CodeLens[]> {
26+
if (!this.client.apiVersion.has220Features()) {
27+
return Promise.resolve([]);
28+
}
29+
return super.provideCodeLenses(document, token);
30+
}
31+
2532
resolveCodeLens(inputCodeLens: CodeLens, token: CancellationToken): Promise<CodeLens> {
2633
const codeLens = inputCodeLens as ReferencesCodeLens;
2734
const args: Proto.FileLocationRequestArgs = {

0 commit comments

Comments
 (0)