chunk-runtime-rpc.00a890d2.mjs 511 B

12345678910111213141516
  1. import { g as getWorkerState } from './chunk-mock-date.2917be60.mjs';
  2. import { w as withSafeTimers } from './chunk-utils-timers.b48455ed.mjs';
  3. const rpc = () => {
  4. const { rpc: rpc2 } = getWorkerState();
  5. return new Proxy(rpc2, {
  6. get(target, p, handler) {
  7. const sendCall = Reflect.get(target, p, handler);
  8. const safeSendCall = (...args) => withSafeTimers(() => sendCall(...args));
  9. safeSendCall.asEvent = sendCall.asEvent;
  10. return safeSendCall;
  11. }
  12. });
  13. };
  14. export { rpc as r };