MCPcopy
hub / github.com/sindresorhus/caprine / sendAction

Function sendAction

source/util.ts:17–25  ·  view source on GitHub ↗
(action: string, arguments_?: T)

Source from the content-addressed store, hash-verified

15}
16
17export function sendAction<T>(action: string, arguments_?: T): void {
18 const win = getWindow();
19
20 if (is.macos) {
21 win.restore();
22 }
23
24 ipcMain.callRenderer(win, action, arguments_);
25}
26
27export async function sendBackgroundAction<T, ReturnValue>(action: string, arguments_?: T): Promise<ReturnValue> {
28 return ipcMain.callRenderer<T, ReturnValue>(getWindow(), action, arguments_);

Callers 4

index.tsFile · 0.90
clickFunction · 0.90
clickFunction · 0.90
clickFunction · 0.90

Calls 1

getWindowFunction · 0.85

Tested by

no test coverage detected