From 59292b95d66f029da7dda7b186a62078235008a5 Mon Sep 17 00:00:00 2001 From: Der_Googler <54764558+DerGoogler@users.noreply.github.com> Date: Thu, 26 Oct 2023 12:45:45 +0200 Subject: [PATCH] Cleanup global types --- Website/src/typings/global.d.ts | 140 +++++++------------------------- 1 file changed, 31 insertions(+), 109 deletions(-) diff --git a/Website/src/typings/global.d.ts b/Website/src/typings/global.d.ts index 7b80ebbb..9ee7c18c 100644 --- a/Website/src/typings/global.d.ts +++ b/Website/src/typings/global.d.ts @@ -1,7 +1,3 @@ -import NShell from "./android/shell"; -import NOS from "./android/os"; -import NBuildConfig from "./android/buildconfig"; - export {}; declare module '*.d.ts' { @@ -26,35 +22,6 @@ declare global { namespace JSX { interface IntrinsicElements { - "module-container": HTMLAttributes; - "lib-container": HTMLAttributes; - "settings-container": HTMLAttributes; - "content-body": HTMLAttributes; - "content-body-inner": HTMLAttributes; - - // ./components/Item.tsx - "item-card-wrapper": HTMLAttributes; - "item-title": HTMLAttributes; - "item-version-author": HTMLAttributes; - "item-description": HTMLAttributes; - "item-last-update": HTMLAttributes; - "item-module-name": HTMLAttributes; - "item-name": HTMLAttributes; - "item-switch": HTMLAttributes; - "item-module-button-wrapper": HTMLAttributes; - "item-module-button": HTMLAttributes; - - // License cards - "license-card-wrapper": HTMLAttributes; - "license-card-title": HTMLAttributes; - "license-card-name": HTMLAttributes; - "license-card-author": HTMLAttributes; - "license-card-description": HTMLAttributes; - "license-card-diver": HTMLAttributes; - "license-card-infos": HTMLAttributes; - "license-card-version": HTMLAttributes; - "license-card-license": HTMLAttributes; - "mmrl-anchor": React.DetailedHTMLProps & { page?: string }, HTMLAnchorElement>; // Onsen Elements @@ -131,51 +98,6 @@ declare global { const __webpack__mode__: "production" | "development"; - type PushPropsExtra = E & { - param?: { - name: string; - value: string; - }; - }; - - interface PushPropsCore { - component: React.ElementType; - - props: P & { - key: string; - extra: PushPropsExtra; - readonly popPage?: () => void; - readonly pushPage?: (...args: [props: PushPropsCore>]) => void; // - }; - } - - interface PushProps { - readonly extra: PushPropsExtra; - // readonly context: { - readonly popPage: (options?: any) => void; - readonly pushPage: (props: PushPropsCore) => void; - readonly splitter: { - readonly show: () => void; - readonly hide: () => void; - readonly state: boolean; - }; - readonly onBackPressed: (handler: EventListener) => void; - readonly onResume: (handler: EventListener) => void; - // }; - } - - interface UseActivity { - readonly context: { - readonly popPage: (options?: any) => void; - readonly pushPage: (props: PushPropsCore) => void; - readonly splitter: { - readonly show: () => void; - readonly hide: () => void; - readonly state: () => boolean; - }; - }; - } - interface StoredRepo extends Omit { modules: string; } @@ -184,19 +106,19 @@ declare global { /** * An required filed, to disply the repository name */ - name: str; - mmrlOwner?: str; + name: string; + mmrlOwner?: string; /** * An given website link for the repository */ - website?: str; + website?: string; /** * Given support link i.g. Telegram, Xda, GitHub or something */ - support?: str; - donate?: str; - submitModule?: str; - last_update: int; + support?: string; + donate?: string; + submitModule?: string; + last_update: number; modules: Module[]; } @@ -211,17 +133,17 @@ declare global { } export interface Module { - id: str; - name: str; - version?: int; - versionCode: int; - author?: str; - description?: str; - valid: bool; - download: str; - last_update: int; - readme: str; - stars: int; + id: string; + name: string; + version?: number; + versionCode: number; + author?: string; + description?: string; + valid: boolean; + download: string; + last_update: number; + readme: string; + stars: number; about: About; mmrl: Mmrl; fox: Fox; @@ -233,21 +155,21 @@ declare global { } export interface Mmrl { - cover?: str; - logo?: str; - screenshots?: arr; - categories?: arr; + cover?: string; + logo?: string; + screenshots?: Array; + categories?: Array; } export interface Fox { - minApi?: int; - maxApi?: int; - minMagisk?: int; - needRamdisk?: bool; - support?: str; - donate?: str; - config?: str; - changeBoot?: bool; - mmtReborn?: bool; + minApi?: number; + maxApi?: number; + minMagisk?: number; + needRamdisk?: boolean; + support?: string; + donate?: string; + config?: string; + changeBoot?: boolean; + mmtReborn?: boolean; } }