From 8656c95f0b4a924d58a840d302e13695d9fda73f Mon Sep 17 00:00:00 2001 From: filtered <176114999+webfiltered@users.noreply.github.com> Date: Sat, 28 Dec 2024 12:43:28 +1100 Subject: [PATCH] Export all API types (#567) * Allow preload types to be used in frontend * Fix enum imported via meta file --- src/main_types.ts | 11 ++++++++++- src/models/DownloadManager.ts | 3 +-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/main_types.ts b/src/main_types.ts index 643cd075..de50f8c0 100644 --- a/src/main_types.ts +++ b/src/main_types.ts @@ -1,3 +1,12 @@ export * from './constants'; export type { DownloadManager, Download, DownloadState } from './models/DownloadManager'; -export type { ElectronAPI } from './preload'; +export type { + ElectronAPI, + ElectronContextMenuOptions, + InstallOptions, + GpuType, + TorchDeviceType, + PathValidationResult, + SystemPaths, + DownloadProgressUpdate, +} from './preload'; diff --git a/src/models/DownloadManager.ts b/src/models/DownloadManager.ts index 2550bb3a..6ee30a20 100644 --- a/src/models/DownloadManager.ts +++ b/src/models/DownloadManager.ts @@ -1,10 +1,9 @@ import { session, DownloadItem, ipcMain } from 'electron'; import path from 'node:path'; import fs from 'node:fs'; -import { IPC_CHANNELS } from '../constants'; +import { DownloadStatus, IPC_CHANNELS } from '../constants'; import log from 'electron-log/main'; import type { AppWindow } from '../main-process/appWindow'; -import { DownloadStatus } from '../main_types'; export interface Download { url: string;