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

onDidChangeCodeLenses:Event<void>, fixes #19495

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