diff options
Diffstat (limited to 'editors/code/src/ctx.ts')
-rw-r--r-- | editors/code/src/ctx.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/editors/code/src/ctx.ts b/editors/code/src/ctx.ts index 8581667b4..9dd2b7d4f 100644 --- a/editors/code/src/ctx.ts +++ b/editors/code/src/ctx.ts | |||
@@ -16,7 +16,7 @@ export class Ctx { | |||
16 | 16 | ||
17 | registerCommand( | 17 | registerCommand( |
18 | name: string, | 18 | name: string, |
19 | factory: (ctx: Ctx) => () => Promise<vscode.TextEditor>, | 19 | factory: (ctx: Ctx) => Cmd, |
20 | ) { | 20 | ) { |
21 | const fullName = `rust-analyzer.${name}` | 21 | const fullName = `rust-analyzer.${name}` |
22 | const cmd = factory(this); | 22 | const cmd = factory(this); |
@@ -28,3 +28,5 @@ export class Ctx { | |||
28 | this.extCtx.subscriptions.push(d) | 28 | this.extCtx.subscriptions.push(d) |
29 | } | 29 | } |
30 | } | 30 | } |
31 | |||
32 | export type Cmd = (...args: any[]) => any; | ||