From 5a4f76fc7199b00719f0975650b98ac16ffebd57 Mon Sep 17 00:00:00 2001 From: Lncvrt Date: Sat, 19 Jul 2025 16:06:01 -0700 Subject: [PATCH] Add types --- src/types/DownloadProgress.ts | 9 +++++++++ src/types/InstallsProps.ts | 5 +++++ src/types/LauncherVersion.ts | 6 ++++++ src/types/SidebarProps.ts | 5 +++++ 4 files changed, 25 insertions(+) create mode 100644 src/types/DownloadProgress.ts create mode 100644 src/types/InstallsProps.ts create mode 100644 src/types/LauncherVersion.ts create mode 100644 src/types/SidebarProps.ts diff --git a/src/types/DownloadProgress.ts b/src/types/DownloadProgress.ts new file mode 100644 index 0000000..4eb6c96 --- /dev/null +++ b/src/types/DownloadProgress.ts @@ -0,0 +1,9 @@ +import { LauncherVersion } from "./LauncherVersion"; + +export class DownloadProgress { + constructor( + public version: LauncherVersion, + public progress: number, + public done: boolean + ) {} +} \ No newline at end of file diff --git a/src/types/InstallsProps.ts b/src/types/InstallsProps.ts new file mode 100644 index 0000000..564f375 --- /dev/null +++ b/src/types/InstallsProps.ts @@ -0,0 +1,5 @@ +import { LauncherVersion } from "./LauncherVersion" + +export type InstallsProps = { + downloadVersions: (versions: LauncherVersion[]) => void +} \ No newline at end of file diff --git a/src/types/LauncherVersion.ts b/src/types/LauncherVersion.ts new file mode 100644 index 0000000..083b335 --- /dev/null +++ b/src/types/LauncherVersion.ts @@ -0,0 +1,6 @@ +export interface LauncherVersion { + version: string, + displayName: string, + platforms: string[], + downloadUrls: string[] +} \ No newline at end of file diff --git a/src/types/SidebarProps.ts b/src/types/SidebarProps.ts new file mode 100644 index 0000000..567eba4 --- /dev/null +++ b/src/types/SidebarProps.ts @@ -0,0 +1,5 @@ +import { DownloadProgress } from "./DownloadProgress" + +export type SidebarProps = { + downloadProgress: DownloadProgress[] +} \ No newline at end of file