Skip to content

Commit

Permalink
Export all API types (#567)
Browse files Browse the repository at this point in the history
* Allow preload types to be used in frontend

* Fix enum imported via meta file
  • Loading branch information
webfiltered authored Dec 28, 2024
1 parent 8426150 commit 8656c95
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
11 changes: 10 additions & 1 deletion src/main_types.ts
Original file line number Diff line number Diff line change
@@ -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';
3 changes: 1 addition & 2 deletions src/models/DownloadManager.ts
Original file line number Diff line number Diff line change
@@ -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;
Expand Down

0 comments on commit 8656c95

Please sign in to comment.