MCPcopy Create free account
hub / github.com/Snapchat/Valdi / registerCommand

Function registerCommand

valdi/vscode_debugger/src/common/contributionUtils.ts:149–153  ·  view source on GitHub ↗
(
  ns: typeof commands,
  key: K,
  fn: (...args: Parameters<ICommandTypes[K]>) => Thenable<ReturnType<ICommandTypes[K]>>,
)

Source from the content-addressed store, hash-verified

147 * Typed guard for registering a command.
148 */
149export const registerCommand = <K extends keyof ICommandTypes>(
150 ns: typeof commands,
151 key: K,
152 fn: (...args: Parameters<ICommandTypes[K]>) => Thenable<ReturnType<ICommandTypes[K]>>,
153) => ns.registerCommand(key, fn);
154
155/**
156 * Typed guard for running a command.

Callers 6

activateFunction · 0.90
registerDebugTerminalUIFunction · 0.90
registerMethod · 0.90
registerProfilingCommandFunction · 0.90
registerAutoAttachFunction · 0.90
registerRevealPageFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected