MCPcopy
hub / github.com/vitest-dev/vitest / safeSendCall

Function safeSendCall

packages/browser/src/client/tester/rpc.ts:44–54  ·  view source on GitHub ↗
(...args: any[])

Source from the content-addressed store, hash-verified

42 }
43 const sendCall = get(target, p, handler)
44 const safeSendCall = (...args: any[]) =>
45 withSafeTimers(getSafeTimers, async () => {
46 const result = sendCall(...args)
47 promises.add(result)
48 try {
49 return await result
50 }
51 finally {
52 promises.delete(result)
53 }
54 })
55 safeSendCall.asEvent = sendCall.asEvent
56 return safeSendCall
57 },

Callers

nothing calls this directly

Calls 3

withSafeTimersFunction · 0.70
addMethod · 0.45
deleteMethod · 0.45

Tested by

no test coverage detected