Convert store to typescript w/ matching interfaces

This commit is contained in:
2022-07-26 23:00:58 +02:00
parent 5eadb0b47a
commit 8216502eeb
15 changed files with 178 additions and 105 deletions

View File

@@ -0,0 +1,4 @@
export default interface IStateDarkmode {
darkmodeSupported: boolean;
userChoice: string | undefined;
}

View File

@@ -0,0 +1,5 @@
export default interface IStateDocumentTitle {
emoji: string;
titlePrefix: string;
title: string | undefined;
}

View File

@@ -0,0 +1,3 @@
export default interface IStateHamburger {
open: boolean;
}

View File

@@ -0,0 +1,16 @@
export enum PopupTypes {
Movie = "movie",
Show = "show",
Person = "person"
}
// export interface IPopupOpen {
// id: string | number;
// type: PopupTypes;
// }
export interface IStatePopup {
id: number | null;
type: PopupTypes | null;
open: boolean;
}

View File

@@ -0,0 +1,6 @@
import type ITorrent from "./ITorrent";
export default interface IStateTorrent {
results: Array<ITorrent>;
resultCount: number | null;
}

View File

@@ -0,0 +1,11 @@
export default interface ITorrent {
name: string;
magnet: string;
uploader: string | null;
size: string;
date: string | Date;
seed: string;
leech: string;
url: string | null;
release_type: Array<string>;
}