mirror of
https://github.com/upscayl/upscayl.git
synced 2024-11-23 23:21:05 +01:00
Updated types
This commit is contained in:
parent
104f80ee21
commit
06dfc83888
@ -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";
|
||||
|
||||
|
@ -18,4 +18,4 @@ const getPlatform = () => {
|
||||
}
|
||||
};
|
||||
|
||||
export { getPlatform };
|
||||
export default getPlatform;
|
||||
|
@ -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";
|
||||
|
||||
|
@ -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),
|
||||
});
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user