You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Consider building a class for events management, so an instance is "exposed to the main world" and can be used like an API client for events (a bag of known methods)
Improve preload.js (and add types, although if the previous one is done it will be typed already because of the class)
Move from window.electron to window.whatever, since the name electron is confusing because it's not actually electron but a custom API that is exposed in window from preload.js
Add specific types in electron.d.ts for window.whatever (rename to whatever.d.ts too), importing specific event types (from original events file, or from @types) so event listeners provide intellisense in the renderer code (again, if a class instance is registered in preload.js we will only need to load that one to get the right typings)
The text was updated successfully, but these errors were encountered:
We need a clearer contract for the events, especially when dealing with them in the renderer process.
@types
) so event listeners provide intellisense in the renderer code (again, if a class instance is registered in preload.js we will only need to load that one to get the right typings)The text was updated successfully, but these errors were encountered: