We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 620b449 commit 1eedb37Copy full SHA for 1eedb37
src/extension.ts
@@ -139,12 +139,13 @@ export async function activate(context: vscode.ExtensionContext) {
139
name: string,
140
callback: (...args: any[]) => any
141
): number => {
142
- const telemetryCallback = (...args: any[]) => {
+ const telemetryCallback = (...args: any[]): any => {
143
const startTime = Date.now();
144
Logger.info(`Command::${name}::Executed`);
145
- callback.apply(this, args);
+ const cbResult = callback.apply(this, args);
146
const timeSpent = Date.now() - startTime;
147
Telemetry.sendEvent("command", { commandName: name }, { timeSpent });
148
+ return cbResult;
149
};
150
return context.subscriptions.push(
151
vscode.commands.registerCommand(name, telemetryCallback)
0 commit comments