To clarify, my question is not rhetorical; I'm actually trying to understand technically why the ES6 import statement does not work.
This question appears to be duplicate, but the accepted answer will not TypeScript transpile for electron. For example:
import * as electron from 'electron';
results in
.\node_modules\.bin\tsc
node_modules/electron/electron.d.ts:8:20 - error TS2304: Cannot find name 'Event'.
8 type GlobalEvent = Event;
This 2 year old answer states the reason is dependent components (nodejs and chrome) don't support it, which is no longer true, so probably not the technical reason. The related electron community discussion also suggests the status is unresolved.
Workaround suggestions so that we can maintain our existing code style are also welcome, but not my primary question. Possible workarounds:
This question has a related title, but the details ask an HTML-specific question, and so is not what I'm looking for.
Lastly, I should mention that I'm not certain electron does not support ES6 imports under some conditions; e.g. I may be missing something fundamental. My assumption is partly because the electron 2.0 manual shows const requires() destructuring syntax instead of imports.