diff --git a/ts/00_commitinfo_data.ts b/ts/00_commitinfo_data.ts index f5a082a..f96f990 100644 --- a/ts/00_commitinfo_data.ts +++ b/ts/00_commitinfo_data.ts @@ -3,6 +3,6 @@ */ export const commitinfo = { name: '@api.global/typedelectron', - version: '1.0.7', + version: '1.0.8', description: 'a package made for ipc communication in electron' } diff --git a/ts/classes.typedelectronbackend.ts b/ts/classes.typedelectronbackend.ts index 27145bb..cf4acb9 100644 --- a/ts/classes.typedelectronbackend.ts +++ b/ts/classes.typedelectronbackend.ts @@ -11,20 +11,23 @@ export class TypedElectronBackend { constructor() { plugins.electron.ipcMain.on('typedrequest', (eventArg, payloadArg) => { - this.typedrouter.routeAndAddResponse(payloadArg); + this.typedrouter.routeAndAddResponse({ ...payloadArg }); // TODO: check how to pass on eventArg }); } createTypedRequest( methodName: T['method'], - windowArg: plugins.electron.BrowserWindow, + windowArg: plugins.electron.BrowserWindow ) { - const typedrequest = new plugins.typedrequest.TypedRequest(new plugins.typedrequest.TypedTarget({ - typedRouterRef: this.typedrouter, - postMethodWithTypedRouter: async (payloadArg: T) => { - windowArg.webContents.send('typedrequest', payloadArg); - } - }), methodName); + const typedrequest = new plugins.typedrequest.TypedRequest( + new plugins.typedrequest.TypedTarget({ + typedRouterRef: this.typedrouter, + postMethodWithTypedRouter: async (payloadArg: T) => { + windowArg.webContents.send('typedrequest', payloadArg); + }, + }), + methodName + ); return typedrequest; } } diff --git a/ts_web/00_commitinfo_data.ts b/ts_web/00_commitinfo_data.ts index f5a082a..f96f990 100644 --- a/ts_web/00_commitinfo_data.ts +++ b/ts_web/00_commitinfo_data.ts @@ -3,6 +3,6 @@ */ export const commitinfo = { name: '@api.global/typedelectron', - version: '1.0.7', + version: '1.0.8', description: 'a package made for ipc communication in electron' } diff --git a/ts_web/index.ts b/ts_web/index.ts index e69de29..aba4b24 100644 --- a/ts_web/index.ts +++ b/ts_web/index.ts @@ -0,0 +1 @@ +export * from './classes.typedelectronfrontend.js';