diff options
author | Aleksey Kladov <[email protected]> | 2019-12-30 13:53:43 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-12-30 13:53:43 +0000 |
commit | 29e86c0c726c20cf1add94a322b9c147b67ca1f6 (patch) | |
tree | fc9842d28586acb138fb228730555812ebd6e98f /editors/code/src/ctx.ts | |
parent | e53ccb6e99bb0e92ebea19f150c8fbf9b6958634 (diff) |
More second command to Ctx
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; | ||