MCPcopy Create free account
hub / github.com/arctic-cli/interface / call

Function call

packages/arctic/src/util/rpc.ts:33–39  ·  view source on GitHub ↗
(method: Method, input: Parameters<T[Method]>[0])

Source from the content-addressed store, hash-verified

31 }
32 return {
33 call<Method extends keyof T>(method: Method, input: Parameters<T[Method]>[0]): Promise<ReturnType<T[Method]>> {
34 const requestId = id++
35 return new Promise((resolve) => {
36 pending.set(requestId, resolve)
37 target.postMessage(JSON.stringify({ type: "rpc.request", method, input, id: requestId }))
38 })
39 },
40 }
41 }
42}

Callers

nothing calls this directly

Calls 1

setMethod · 0.45

Tested by

no test coverage detected