electron.ts 752 B

12345678910111213141516171819202122
  1. import type { Electron } from "./types/ipc";
  2. // type ElectronAPIsType =
  3. // TODO (MR):
  4. // eslint-disable-next-line @typescript-eslint/no-explicit-any
  5. const ElectronAPIs = (globalThis as unknown as any)[
  6. // eslint-disable-next-line @typescript-eslint/dot-notation, @typescript-eslint/no-unsafe-member-access
  7. "ElectronAPIs"
  8. ] as Electron;
  9. // /**
  10. // * Extend the global object's (`globalThis`) interface to state that it can
  11. // * potentially hold a property called `electron`. It will be injected by our
  12. // * preload.js script when we're running in the context of our desktop app.
  13. // */
  14. // declare global {
  15. // const electron: Electron | undefined;
  16. // }
  17. // export const globalElectron = globalThis.electron;
  18. export default ElectronAPIs;