import type garfish from 'garfish'; import type { interfaces as GarfishInterfaces } from 'garfish'; import React from 'react'; export type Options = typeof garfish.options; export type ModuleInfo = GarfishInterfaces.AppInfo & { Component?: React.ComponentType | React.ElementType; path?: string; originInfo?: Record; }; export type ModulesInfo = Array; export type Manifest = { modules?: ModulesInfo; loadable?: LoadableConfig; componentRender?: boolean; getAppList?: (info: any) => Promise>; }; export type LoadingComponent = React.ComponentType<{ isLoading: boolean; pastDelay: boolean; timedOut: boolean; error: any; retry: () => void; }>; export interface LoadableConfig { timeout?: number; delay?: number; loading?: LoadingComponent; } export type ModernGarfishConfig = { manifest?: Manifest; }; export type MicroComponentProps = { loadable?: LoadableConfig; [index: string]: any; }; export type Config = Partial & ModernGarfishConfig; export type UseModuleApps = { [index in 'apps' | string]: index extends 'apps' ? ModulesInfo : React.FC; } & { readonly MApp: React.FC; readonly apps: ModulesInfo; }; export declare function useModuleApps(): UseModuleApps; export declare function useModuleApp(): React.FC;