Add types
This commit is contained in:
9
src/types/DownloadProgress.ts
Normal file
9
src/types/DownloadProgress.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { LauncherVersion } from "./LauncherVersion";
|
||||
|
||||
export class DownloadProgress {
|
||||
constructor(
|
||||
public version: LauncherVersion,
|
||||
public progress: number,
|
||||
public done: boolean
|
||||
) {}
|
||||
}
|
||||
5
src/types/InstallsProps.ts
Normal file
5
src/types/InstallsProps.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
import { LauncherVersion } from "./LauncherVersion"
|
||||
|
||||
export type InstallsProps = {
|
||||
downloadVersions: (versions: LauncherVersion[]) => void
|
||||
}
|
||||
6
src/types/LauncherVersion.ts
Normal file
6
src/types/LauncherVersion.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
export interface LauncherVersion {
|
||||
version: string,
|
||||
displayName: string,
|
||||
platforms: string[],
|
||||
downloadUrls: string[]
|
||||
}
|
||||
5
src/types/SidebarProps.ts
Normal file
5
src/types/SidebarProps.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
import { DownloadProgress } from "./DownloadProgress"
|
||||
|
||||
export type SidebarProps = {
|
||||
downloadProgress: DownloadProgress[]
|
||||
}
|
||||
Reference in New Issue
Block a user