Skip to content

Commit 212a226

Browse files
committed
chore: add registerCommand function helper
1 parent 75fa98d commit 212a226

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/common/command.api.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
/* eslint-disable @typescript-eslint/no-explicit-any */
22
import { commands } from 'vscode';
3+
import { Disposable } from 'vscode-jsonrpc';
4+
5+
export function registerCommand(command: string, callback: (...args: any[]) => any, thisArg?: any): Disposable {
6+
return commands.registerCommand(command, callback, thisArg);
7+
}
38

49
export function executeCommand<T = unknown>(command: string, ...rest: any[]): Thenable<T> {
510
return commands.executeCommand(command, ...rest);

0 commit comments

Comments
 (0)