Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Split 'Event' docs/types into more specific Event types #17038

Merged
merged 1 commit into from Feb 19, 2019

Conversation

Projects
None yet
2 participants
@MarshallOfSound
Copy link
Member

MarshallOfSound commented Feb 19, 2019

  • Event = Base event type (with preventDefault)
  • IpcMainEvent = Event that ipcMain emits (with sender, reply, etc.)
  • IpcRendererEvent = Event that ipcRenderer emits (with sender,
    senderId, etc.)
  • KeyboardEvent = Event that we emit with keyboard flags (ctrlKey,
    altKey, etc.)

This will dramatically improve peoples TS experience with IPC events

For full context on the changes please review the Archeologist Check

This also allows us to more strictly type the different between ipcMain and ipcMainInternal (the reply vs _replyInternal)

Notes: no-notes

@MarshallOfSound MarshallOfSound requested review from as code owners Feb 19, 2019

@MarshallOfSound

This comment has been minimized.

Copy link
Member Author

MarshallOfSound commented Feb 19, 2019

Further note, this is required for strong typing and further TSification of the browser code in particular things like the navigation-controller

@MarshallOfSound MarshallOfSound force-pushed the typescript/event-strict-types branch from 2abd69b to d96dd8d Feb 19, 2019

refactor: Split 'Event' docs/types into more specific Event types
* Event = Base event type (with preventDefault)
* IpcMainEvent = Event that ipcMain emits (with sender, reply, etc.)
* IpcRendererEvent = Event that ipcRenderer emits (with sender,
senderId, etc.)
* KeyboardEvent = Event that we emit with keyboard flags (ctrlKey,
altKey, etc.)

This will dramatically improve peoples TS experience with IPC events

@MarshallOfSound MarshallOfSound force-pushed the typescript/event-strict-types branch from d96dd8d to 71de845 Feb 19, 2019

@codebytere
Copy link
Member

codebytere left a comment

🌟

@codebytere codebytere merged commit 3b74837 into master Feb 19, 2019

8 checks passed

Semantic Pull Request ready to be squashed
Details
appveyor: win-ia32-debug AppVeyor build succeeded
Details
appveyor: win-ia32-testing AppVeyor build succeeded
Details
appveyor: win-ia32-testing-pr AppVeyor build succeeded
Details
appveyor: win-x64-debug AppVeyor build succeeded
Details
appveyor: win-x64-testing AppVeyor build succeeded
Details
appveyor: win-x64-testing-pr AppVeyor build succeeded
Details
release-notes Release notes found
@release-clerk

This comment has been minimized.

Copy link

release-clerk bot commented Feb 19, 2019

No Release Notes

@codebytere codebytere deleted the typescript/event-strict-types branch Feb 19, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.