Migrate electron files to typescript (#267)

- Switches electron src files to typescript with minimum typing required
for build
- Adds webpack-merge for shared typescript build config and jsdoc types
- Minor README changes

---------

Co-authored-by: emma <hi@emma.cafe>
This commit is contained in:
sua yoo
2023-11-29 15:53:48 -05:00
committed by emma
co-authored by emma
parent ad38694598
commit 03fefc85a5
7 changed files with 60 additions and 40 deletions
@@ -1,4 +1,4 @@
/*eslint-env node */
/* eslint-env node */
import fetch from "node-fetch";
import { Headers } from "node-fetch";
@@ -41,9 +41,6 @@ const URL_RX = /([^/]+)\/([\d]+)(?:\w\w_)?\/(.*)$/;
// ============================================================================
class ElectronReplayApp {
/**
* @type {string}
*/
pluginPath = "";
appPath = app.getAppPath();
@@ -54,26 +51,17 @@ class ElectronReplayApp {
profileName = "";
proxyColl = null;
proxyColl: string | null = null;
proxyTS = null;
proxyTS: string | null = null;
/**
* @type {BrowserWindow | null}
*/
mainWindow = null;
mainWindow: BrowserWindow | null = null;
/**
* @type {string | null}
*/
openNextFile = null;
openNextFile: string | null = null;
screenSize = { width: 1024, height: 768 };
/**
* @type {string | null}
*/
origUA = null;
origUA: string | null = null;
constructor({ staticPath = "./", profileName = "" } = {}) {
this.staticContentPath = staticPath;