MCPcopy
hub / github.com/brimdata/zui / invoke

Function invoke

apps/zui/src/core/invoke.ts:3–15  ·  view source on GitHub ↗
(
  name: K,
  ...args: Parameters<Operations[K]>
)

Source from the content-addressed store, hash-verified

1import {OperationName, Operations} from "src/domain/messages"
2
3export function invoke<K extends OperationName>(
4 name: K,
5 ...args: Parameters<Operations[K]>
6): Promise<Awaited<ReturnType<Operations[K]>>> {
7 return global.zui.invoke(name, ...args).catch((error) => {
8 throw new Error(
9 error
10 .toString()
11 // Here we are stripping the error prefix that electron tacks on.
12 .replace(`Error: Error invoking remote method '${name}': `, "")
13 )
14 })
15}

Callers 15

SearchPageFunction · 0.90
clickFunction · 0.90
closeActiveMethod · 0.90
getInitialStateFunction · 0.90
syncWindowFunction · 0.90
saveStateFunction · 0.90
initGlobalsFunction · 0.90
initializeFunction · 0.90
AboutWindowFunction · 0.90
ContentFunction · 0.90
showMessageBoxFunction · 0.90
whoisFunction · 0.90

Calls 3

invokeMethod · 0.80
toStringMethod · 0.65
replaceMethod · 0.45

Tested by

no test coverage detected