Comments (4)
- I think I was just lazy as I also wanted to expose the native methods. In hindsight, I should have done it the other way around an assigned the native methods to my own exported object. This should be fixed. Help welcome :)
- I never considered the TypeScript case, but you're right, that does indeed make it more awkward (see https://github.com/sindresorhus/electron-better-ipc/pull/13/files#r275195838). I'm inclined to change it now.
@BendingBender @CvX Thoughts?
from electron-better-ipc.
1. I think I was just lazy as I also wanted to expose the native methods. In hindsight, I should have done it the other way around an assigned the native methods to my own exported object. This should be fixed. Help welcome :)
I think I'll fix it in #13.
2. I never considered the TypeScript case, but you're right, that does indeed make it more awkward (see [sindresorhus/electron-better-ipc/pull/13/files#r275195838](https://github.com/sindresorhus/electron-better-ipc/pull/13/files#r275195838)). I'm inclined to change it now.
I think that exposing two different exports is the way to go. It cleanly fixes the TS case. We could also provide two different entry points ('electron-better-ipc/renderer'
and 'electron-better-ipc/main'
) but I dislike this approach due to ergonomics.
from electron-better-ipc.
Alright. Two different exports it is then. Thanks for chiming in.
from electron-better-ipc.
Alright. Two different exports it is then. Thanks for chiming in.
from electron-better-ipc.
Related Issues (20)
- Add test for #9 and #16 HOT 3
- Issues with receiving data from callMain HOT 10
- Cant receive ipc msg after webpack hot reload HOT 9
- Communicating between two renderer processes HOT 3
- Issue when building outside renderer process HOT 3
- type JsonValue | PromiseLike<JsonValue> not work
- Use `any` instead of `unknown` HOT 6
- what's the difference with `invoke handle` in Electron v7 HOT 3
- `sendToRenderers` acts differently than `callRenderer` HOT 3
- Support ipcRenderer to ipcRenderer communication HOT 2
- Calling `ipc.callFocusedRenderer` when no windows are focused HOT 4
- ipcRenderer.callMain - subsequent calls return non-resolving Promises HOT 11
- Can't resolve 'fs' HOT 4
- BetterIpcRenderer on method only gets called once HOT 6
- warning: WebContents #1 called ipcRenderer.sendSync() with 'electron-store-get-data' channel without listeners. HOT 7
- Better Typescript Support HOT 5
- Add timeout options and wrap with p-timeout
- No longer necessary? (superseded by official `handle()` method?) HOT 4
- Errors passed as empty objects HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from electron-better-ipc.