feat: improved type safety

This commit is contained in:
Matthias 2024-11-17 11:39:59 +01:00
parent c908bef966
commit 67a9615347

View File

@ -2,14 +2,19 @@ export interface BgTaskStarted {
job_id: string; job_id: string;
} }
export interface ProgressTask {
progress: number;
total: number;
description: string;
}
export interface BackgroundTaskStatus { export interface BackgroundTaskStatus {
job_id: string; job_id: string;
job_category: string; job_category: string;
status: string; status: string;
running: boolean; running: boolean;
progress?: number; progress?: number;
// TODO: type this properly progress_tasks?: Record<string, ProgressTask>;
progress_tasks?: Record<string, any>;
} }
export interface BackgroundTaskResult { export interface BackgroundTaskResult {