MCPcopy
hub / github.com/foambubble/foam / registerCommand

Function registerCommand

packages/foam-vscode/src/test/vscode-mock.ts:2188–2198  ·  view source on GitHub ↗
(
    command: string,
    callback: (...args: any[]) => any
  )

Source from the content-addressed store, hash-verified

2186// Commands namespace
2187export const commands = {
2188 registerCommand(
2189 command: string,
2190 callback: (...args: any[]) => any
2191 ): { dispose(): void } {
2192 mockState.commands.set(command, callback);
2193 return {
2194 dispose() {
2195 mockState.commands.delete(command);
2196 },
2197 };
2198 },
2199
2200 async executeCommand<T = unknown>(
2201 command: string,

Callers

nothing calls this directly

Calls 1

setMethod · 0.65

Tested by

no test coverage detected