[desktop] Flow type electron
Summary:
ENG-2221
This diff adds flow types for the electron package (or at least for the parts we use).
The types are mostly taken from the documentation but I been also looking at the typescript types (which are generated automatically from the documentation anyway).
Some modules are only available in the main process (main.js) or in the renderer process (preload.js). To make that explicit I re-export the appropriate types in electron/main and electron/renderer modules. I use them instead of the electron module which contains all types.
Test Plan: Run flow in desktop.
Reviewers: tomek, ginsu, inka, ashoat
Reviewed By: ashoat
Subscribers: ashoat, atul
Differential Revision: https://phab.comm.dev/D6176