Skip to content

Commit a1adafe

Browse files
committed
chore: add ipc mock
1 parent 8bc036d commit a1adafe

File tree

1 file changed

+8
-0
lines changed
  • apps/agent-tars/src/renderer/mock

1 file changed

+8
-0
lines changed

apps/agent-tars/src/renderer/mock/ipc.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,8 @@ declare global {
136136
ipcRenderer: {
137137
invoke: (channel: string, ...args: any[]) => Promise<any>;
138138
on: (channel: string, listener: (...args: any[]) => void) => void;
139+
once: (channel: string, listener: (...args: any[]) => void) => void;
140+
off: (channel: string, listener: (...args: any[]) => void) => void;
139141
};
140142
};
141143
}
@@ -148,5 +150,11 @@ window.electron = {
148150
on: async () => {
149151
// noop
150152
},
153+
once: async () => {
154+
// noop
155+
},
156+
off: async () => {
157+
// noop
158+
},
151159
},
152160
};

0 commit comments

Comments
 (0)