提交 1162f894 编写于 作者: J Johannes Rieken

onDidChangeCodeLenses:Event<void>, fixes #19495

上级 37f14844
...@@ -28,11 +28,11 @@ class ReferencesCodeLens extends CodeLens { ...@@ -28,11 +28,11 @@ class ReferencesCodeLens extends CodeLens {
export default class TypeScriptReferencesCodeLensProvider implements CodeLensProvider { export default class TypeScriptReferencesCodeLensProvider implements CodeLensProvider {
private enabled = false; private enabled = false;
private onDidChangeCodeLensesEmitter = new EventEmitter<CodeLensProvider>(); private onDidChangeCodeLensesEmitter = new EventEmitter<void>();
public constructor(private client: ITypescriptServiceClient) { } public constructor(private client: ITypescriptServiceClient) { }
public get onDidChangeCodeLenses(): Event<CodeLensProvider> { public get onDidChangeCodeLenses(): Event<void> {
return this.onDidChangeCodeLensesEmitter.event; return this.onDidChangeCodeLensesEmitter.event;
} }
...@@ -41,7 +41,7 @@ export default class TypeScriptReferencesCodeLensProvider implements CodeLensPro ...@@ -41,7 +41,7 @@ export default class TypeScriptReferencesCodeLensProvider implements CodeLensPro
const wasEnabled = this.enabled; const wasEnabled = this.enabled;
this.enabled = typeScriptConfig.get('referencesCodeLens.enabled', false); this.enabled = typeScriptConfig.get('referencesCodeLens.enabled', false);
if (wasEnabled !== this.enabled) { if (wasEnabled !== this.enabled) {
this.onDidChangeCodeLensesEmitter.fire(this); this.onDidChangeCodeLensesEmitter.fire();
} }
} }
...@@ -159,4 +159,4 @@ export default class TypeScriptReferencesCodeLensProvider implements CodeLensPro ...@@ -159,4 +159,4 @@ export default class TypeScriptReferencesCodeLensProvider implements CodeLensPro
(item.childItems || []).forEach(item => this.extractReferenceableSymbols(document, item, results)); (item.childItems || []).forEach(item => this.extractReferenceableSymbols(document, item, results));
} }
}; };
\ No newline at end of file
...@@ -1598,7 +1598,7 @@ declare module 'vscode' { ...@@ -1598,7 +1598,7 @@ declare module 'vscode' {
/** /**
* An optional event to signal that the code lenses from this provider have changed. * An optional event to signal that the code lenses from this provider have changed.
*/ */
onDidChangeCodeLenses?: Event<this>; onDidChangeCodeLenses?: Event<void>;
/** /**
* Compute a list of [lenses](#CodeLens). This call should return as fast as possible and if * Compute a list of [lenses](#CodeLens). This call should return as fast as possible and if
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册