]> git.lizzy.rs Git - rust.git/blobdiff - editors/code/src/ctx.ts
More second command to Ctx
[rust.git] / editors / code / src / ctx.ts
index 8581667b4e35d9ea3b0da8142de6b15f6e23e36a..9dd2b7d4fa143931bacf82d15609784503786f35 100644 (file)
@@ -16,7 +16,7 @@ export class Ctx {
 
     registerCommand(
         name: string,
-        factory: (ctx: Ctx) => () => Promise<vscode.TextEditor>,
+        factory: (ctx: Ctx) => Cmd,
     ) {
         const fullName = `rust-analyzer.${name}`
         const cmd = factory(this);
@@ -28,3 +28,5 @@ export class Ctx {
         this.extCtx.subscriptions.push(d)
     }
 }
+
+export type Cmd = (...args: any[]) => any;