I'm trying to learn how to use electron with Angular and got confused with syntax I saw from the Electrogram app.
Link: https://github.com/onehungrymind/electrogram
In the app.ts file of electrogram's project, I saw the syntax:
import { remote, ipcRenderer } from 'electron';
...
let {dialog} = remote;
I think it's referring to dialog: Electron.Dialog;
in the projects index.d.ts at path typings/globals/github-electron although I really don't know yet how this is happening. (I'm also really new to typescript).
If this was globally declared shouldn't it be at least Electron.CommonElectron.dialog
?
How can the compiler just know right away what we are referring to by just saying let { dialog }
?
Any explanation on this would be greatly appreciated as I really have no idea whats going on.