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

FIX: types issue during runtime

This commit is contained in:
abhishek-gaonkar 2024-11-10 14:57:04 +05:30
parent 5a05883058
commit cb7b45ab59
3 changed files with 4 additions and 2 deletions

1
common/image-formats.ts Normal file
View File

@ -0,0 +1 @@
export const imageFormats = ["png", "jpg", "jpeg", "webp"] as const;

View File

@ -3,7 +3,8 @@ import logit from "../utils/logit";
import fs from "fs"; import fs from "fs";
import path from "path"; import path from "path";
import { ELECTRON_COMMANDS } from "../../common/electron-commands"; import { ELECTRON_COMMANDS } from "../../common/electron-commands";
import { ImageFormat, imageFormats } from "../types/types"; import { ImageFormat } from "../types/types";
import { imageFormats } from "../../common/image-formats";
interface IClipboardFileParameters { interface IClipboardFileParameters {
name: string; name: string;

View File

@ -1,3 +1,3 @@
export const imageFormats = ["png", "jpg", "jpeg", "webp"] as const; import { imageFormats } from "../../common/image-formats";
export type ImageFormat = (typeof imageFormats)[number]; export type ImageFormat = (typeof imageFormats)[number];