Skip to content

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

Merged
codebytere merged 1 commit into
masterfrom
typescript/event-strict-types
Feb 19, 2019
Merged

codebytere merged 1 commit into
masterfrom
typescript/event-strict-types

Conversation

@MarshallOfSound

@MarshallOfSound MarshallOfSound commented Feb 19, 2019 •

Copy link
Copy Markdown
Member
  • 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 a team February 19, 2019 01:35
@MarshallOfSound

Copy link
Copy Markdown
Member Author

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

* 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 Compare February 19, 2019 02:14

@codebytere codebytere left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🌟

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

release-clerk Bot commented Feb 19, 2019

Copy link
Copy Markdown

No Release Notes

@codebytere
codebytere deleted the typescript/event-strict-types branch February 19, 2019 09:25
deepak1556 added a commit to microsoft/vscode that referenced this pull request Jun 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants