1
0
mirror of https://github.com/upscayl/upscayl.git synced 2024-11-28 01:10:52 +01:00

Updated types

This commit is contained in:
Feenix 2022-11-12 02:17:00 +05:30
parent 104f80ee21
commit 06dfc83888
5 changed files with 7 additions and 14 deletions

View File

@ -5,7 +5,7 @@
*/
import { join, dirname, resolve } from "path";
import { getPlatform } from "./getPlatform";
import getPlatform from "./getPlatform";
import isDev from "electron-is-dev";
import { app } from "electron";

View File

@ -18,4 +18,4 @@ const getPlatform = () => {
}
};
export { getPlatform };
export default getPlatform;

View File

@ -5,7 +5,7 @@ import { ChildProcessWithoutNullStreams, spawn } from "child_process";
import fs from "fs";
import sizeOf from "image-size";
import { autoUpdater } from "electron-updater";
import { getPlatform } from "./getPlatform";
import getPlatform from "./getPlatform";
import { execPath, modelsPath } from "./binaries";

View File

@ -2,10 +2,11 @@ import { ipcRenderer, contextBridge } from "electron";
// 'ipcRenderer' will be available in index.js with the method 'window.electron'
contextBridge.exposeInMainWorld("electron", {
send: (command, payload) => ipcRenderer.send(command, payload),
on: (command, func) =>
send: (command: string, payload: any) => ipcRenderer.send(command, payload),
on: (command: string, func: (...args: any) => any) =>
ipcRenderer.on(command, (event, args) => {
func(event, args);
}),
invoke: (command, payload) => ipcRenderer.invoke(command, payload),
invoke: (command: string, payload: any) =>
ipcRenderer.invoke(command, payload),
});

View File

@ -1,14 +1,6 @@
import { spawn } from "child_process";
import { execPath } from "./binaries";
/**
*
* @param {*} inputFile
* @param {*} outFile
* @param {*} modelsPath
* @param {*} model
* @returns
*/
function upscaylImage(
inputFile: string,
outFile: string,