Skip to content

Commit

Permalink
refactor: Update type casting in commands functions
Browse files Browse the repository at this point in the history
  • Loading branch information
pacholoamit committed Jun 10, 2024
1 parent e8ed365 commit f09f239
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/lib/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { Command, DiskItem, KillProcessOpts, KillProcessResult, ScanOpts } from

// TODO: Fix types
export const commands = {
killProcess: (opts: KillProcessOpts): Promise<KillProcessResult> => invoke(Command.KillProcess, opts),
killProcess: (opts: KillProcessOpts): Promise<KillProcessResult> => invoke(Command.KillProcess, opts as any),
showInFolder: (path: string): Promise<void> => invoke(Command.ShowInFolder, { path }),
turboScan: (path: ScanOpts): Promise<DiskItem> => invoke(Command.DiskTurboScan, path),
scan: (path: ScanOpts): Promise<DiskItem> => invoke(Command.DiskScan, path),
disk_analysis_flattened: (path: ScanOpts): Promise<DiskItem[]> => invoke(Command.DiskAnalysisFlattened, path),
turboScan: (path: ScanOpts): Promise<DiskItem> => invoke(Command.DiskTurboScan, path as any),
scan: (path: ScanOpts): Promise<DiskItem> => invoke(Command.DiskScan, path as any),
disk_analysis_flattened: (path: ScanOpts): Promise<DiskItem[]> => invoke(Command.DiskAnalysisFlattened, path as any),
};

0 comments on commit f09f239

Please sign in to comment.