registerCommand(
name: string,
- factory: (ctx: Ctx) => () => Promise<vscode.TextEditor>,
+ factory: (ctx: Ctx) => Cmd,
) {
const fullName = `rust-analyzer.${name}`
const cmd = factory(this);
this.extCtx.subscriptions.push(d)
}
}
+
+export type Cmd = (...args: any[]) => any;