// Generated by dts-bundle v0.7.3 // Dependencies for this module: // ../../../../react-helmet // ../../../../@ice/store // ../../../../react // ../../../../axios // ../../../../@ahooksjs/use-request/lib/types // ../../../../react-router // ../../../../create-app-shared // ../../../../react-app-renderer // ../../../../react-router-dom // ../../../../history declare module 'ice' { import logger from 'ice/plugins/logger'; export * from 'ice/plugins/router'; import { config, APP_MODE } from 'ice/plugins/config'; import { Helmet } from 'react-helmet'; import { createStore } from '@ice/store'; export * from 'ice/plugins/auth/pluginRuntime/runtime/Auth'; import request from 'ice/plugins/request/request'; import useRequest from 'ice/plugins/request/useRequest'; export { logger, config, APP_MODE, Helmet as Head, Helmet, createStore, request, useRequest, }; export * from 'ice/core/routerAPI'; export * from 'ice/core/publicAPI'; export { lazy } from 'ice/core/lazy'; export * from 'ice/core/runApp'; export * from 'ice/types'; } declare module 'ice/plugins/logger' { const logger: { trace: { (...data: any[]): void; (message?: any, ...optionalParams: any[]): void; }; debug: { (...data: any[]): void; (message?: any, ...optionalParams: any[]): void; }; info: { (...data: any[]): void; (message?: any, ...optionalParams: any[]): void; }; warn: { (...data: any[]): void; (message?: any, ...optionalParams: any[]): void; }; error: { (...data: any[]): void; (message?: any, ...optionalParams: any[]): void; }; }; export default logger; } declare module 'ice/plugins/router' { export * from 'ice/plugins/router/react-router-dom'; export * from 'ice/plugins/router/history'; } declare module 'ice/plugins/config' { interface Config { readonly [propName: string]: any; } const config: Config; const APP_MODE: any; export { config, APP_MODE }; } declare module 'ice/plugins/auth/pluginRuntime/runtime/Auth' { import { FC } from 'react'; import { ContextType, AuthType, IAuth } from 'ice/plugins/auth/pluginRuntime/runtime/types'; interface ProviderProps { value: AuthType; } interface InjectProps { auth: ContextType[0]; useAuth: ContextType[1]; } const Provider: FC; const useAuth: () => ContextType; function withAuth(Component: React.ComponentType): (props: Omit) => JSX.Element; export { useAuth, withAuth, Provider }; export type { IAuth }; } declare module 'ice/plugins/request/request' { import type { AxiosRequestConfig, CancelTokenStatic, CancelStatic } from 'axios'; interface IRequestConfig extends AxiosRequestConfig { instanceName?: string; withFullResponse?: boolean; } export interface IRequestProps { get: (url: string, config?: IRequestConfig) => Promise; delete: (url: string, config?: IRequestConfig) => Promise; head: (url: string, config?: IRequestConfig) => Promise; options: (url: string, config?: IRequestConfig) => Promise; post: (url: string, data?: any, config?: IRequestConfig) => Promise; put: (url: string, data?: any, config?: IRequestConfig) => Promise; patch: (url: string, data?: any, config?: IRequestConfig) => Promise; } interface IRequest extends IRequestProps { (options: IRequestConfig): Promise; (url: string, config?: IRequestConfig): Promise; Cancel: CancelStatic; CancelToken: CancelTokenStatic; isCancel(value: any): boolean; } const _default: IRequest; export default _default; } declare module 'ice/plugins/request/useRequest' { import type { BaseOptions, BasePaginatedOptions, BaseResult, CombineService, LoadMoreFormatReturn, LoadMoreOptions, LoadMoreOptionsWithFormat, LoadMoreParams, OptionsWithFormat, PaginatedFormatReturn, PaginatedOptionsWithFormat, PaginatedParams } from '@ahooksjs/use-request/lib/types'; type OmitBaseResult = Omit, 'run'>; interface IceBaseResult extends OmitBaseResult { request: (...args: P) => Promise; } interface IceLoadMoreResult extends OmitBaseResult> { } interface IcePaginatedResult extends OmitBaseResult, PaginatedParams> { } function useRequest(service: CombineService, options: OptionsWithFormat): IceBaseResult; function useRequest(service: CombineService, options?: BaseOptions): IceBaseResult; function useRequest(service: CombineService>, options: LoadMoreOptionsWithFormat): IceLoadMoreResult; function useRequest(service: CombineService>, options: LoadMoreOptions): IceLoadMoreResult; function useRequest(service: CombineService, options: PaginatedOptionsWithFormat): IcePaginatedResult; function useRequest(service: CombineService, PaginatedParams>, options: BasePaginatedOptions): IcePaginatedResult; export default useRequest; } declare module 'ice/core/routerAPI' { import { withRouter } from 'react-router'; import { history, getHistory, setHistory } from 'create-app-shared'; export { withRouter, history, getHistory, setHistory }; } declare module 'ice/core/publicAPI' { import { withPageLifeCycle, emitLifeCycles, createBaseApp, getSearchParams } from 'create-app-shared'; import { getInitialData } from 'react-app-renderer'; import ErrorBoundary from 'ice/core/ErrorBoundary'; const usePageShow: (callback: import("create-app-shared").Listener) => void, usePageHide: (callback: import("create-app-shared").Listener) => void; export { createBaseApp, getInitialData, emitLifeCycles, usePageShow, usePageHide, withPageLifeCycle, ErrorBoundary, getSearchParams, }; } declare module 'ice/core/lazy' { export function lazy(dynamicImport: any, isRouteComponent?: boolean): any; } declare module 'ice/core/runApp' { import { IAppConfig } from 'ice/types'; export function runApp(appConfig?: IAppConfig): void; const _default: { createBaseApp: (appConfig: T, buildConfig: P, context: S, staticConfig?: any) => { runtime: import("create-app-shared/lib/runtimeModule").default; appConfig: T; }; initAppLifeCycles: () => void; }; export default _default; } declare module 'ice/types' { import { ReactElement as FrameworkElement, ComponentType as FrameworkComponentType, ReactNode as FrameworkNode } from 'react'; import { IAppRouterProps } from 'ice/plugins/router/types'; import { IStore } from 'ice/plugins/store/types'; import { IAuth } from 'ice/plugins/auth/pluginRuntime/runtime/types'; import { IRequest } from 'ice/plugins/request/types'; export * from 'ice/plugins/router/types'; export * from 'ice/plugins/store/types'; interface IOnTabItemClickParams { from: string; path: string; text: string; index: number; } interface IQuery { [key: string]: string; } interface IContext { pathname: string; query?: IQuery; ssrError?: any; path?: string; } interface IStoreConfig { disableResetPageState: boolean; } export interface IBuildConfig { router?: object | boolean; store?: boolean | IStoreConfig; icestarkType?: 'es' | 'umd' | 'normal'; web?: object; mpa?: boolean; } export interface IApp { rootId?: string; mountNode?: HTMLElement; addProvider?: ({ children }: { children: FrameworkNode; }) => FrameworkElement; renderComponent?: FrameworkComponentType; getInitialData?: (ctx?: IContext) => Promise; errorBoundary?: boolean; ErrorBoundaryFallback?: FrameworkComponentType; onErrorBoundaryHandler?: (error: Error, componentStack: string) => any; onLaunch?: (options?: any) => any; onShow?: () => any; onHide?: () => any; onError?: (error: Error) => any; onPageNotFound?: (options?: any) => any; onUnhandledRejection?: (options?: any) => any; onTabItemClick?: ({ from, path, text, index }: IOnTabItemClickParams) => any; [key: string]: any; } export interface IAppConfig { app?: IApp; renderComponent?: FrameworkElement; router?: IAppRouterProps; store?: IStore; auth?: IAuth; request?: IRequest; } global { interface Window { __ICE_SSR_ENABLED__: any; __ICE_APP_DATA__: any; __ICE_PAGE_PROPS__: any; } } } declare module 'ice/plugins/router/react-router-dom' { export { Link, NavLink, Prompt, Redirect, Route, Switch, matchPath, generatePath, useHistory, useLocation, useParams, useRouteMatch } from 'react-router-dom'; } declare module 'ice/plugins/router/history' { export { createBrowserHistory, createHashHistory, createMemoryHistory } from 'history'; } declare module 'ice/plugins/auth/pluginRuntime/runtime/types' { export interface IAuth { NoAuthFallback?: React.ReactNode; } export type AuthType = Record; export type ContextType = [AuthType, React.Dispatch>]; } declare module 'ice/core/ErrorBoundary' { import { Component } from 'react'; interface IProps { children?: React.ReactNode; Fallback?: React.ComponentType; onError?: (err: Error, componentStack: string) => void; } interface IErrorInfo { componentStack: string; } interface IState { error?: Error | null; info?: IErrorInfo; } class ErrorBoundary extends Component { static defaultProps: IProps; constructor(props: any); componentDidCatch(error: Error, info: IErrorInfo): void; render(): {} | null; } export default ErrorBoundary; } declare module 'ice/plugins/router/types' { import { RouteProps as DefaultRouteProps, RouteComponentProps } from 'react-router-dom'; import { History } from 'history'; import { RouteItemProps, IModifyRoutes } from 'ice/plugins/router/types/base'; export interface IAppRouterProps { type?: 'hash' | 'browser' | 'memory' | 'static'; routes?: RouteItemProps[]; basename?: string; modifyRoutes?: IModifyRoutes; fallback?: React.ReactNode; history?: History; initialIndex?: number; initialEntries?: string[]; } export interface IRouterConfig extends DefaultRouteProps { children?: IRouterConfig[]; path?: string; redirect?: string; pageConfig?: any; getInitialProps?: any; component?: React.ComponentType> | React.ComponentType; wrappers?: ((PageComponent: React.ComponentType) => (props: object) => JSX.Element)[]; } } declare module 'ice/plugins/store/types' { import { Models, IcestoreRootState, IcestoreDispatch } from '@ice/store'; interface IInitialStates { [key: string]: any; } export interface IStore { initialStates?: IInitialStates; } export type IStoreModels = Models; export type IStoreDispatch = IcestoreDispatch; export type IStoreRootState = IcestoreRootState; export {}; } declare module 'ice/plugins/request/types' { import type { AxiosRequestConfig, AxiosResponse, AxiosError } from 'axios'; export interface IInterceptorRequest { onConfig?: (config: T) => T | Promise; onError?: (error: AxiosError) => Promise; } export interface IInterceptorResponse { onConfig?: (response: K) => K | Promise; onError?: (error: AxiosError) => Promise; } export interface IInterceptors { request?: IInterceptorRequest; response?: IInterceptorResponse; } interface ICustomRequest extends AxiosRequestConfig { instanceName?: string; withFullResponse?: boolean; interceptors?: IInterceptors; } export type IRequest = ICustomRequest | ICustomRequest[]; export {}; } declare module 'ice/plugins/router/types/base' { import { RouteProps as DefaultRouteProps, RouteComponentProps } from 'react-router-dom'; export interface IDynamicImportComponent { __LAZY__: boolean; dynamicImport: () => Promise<{ default: React.ComponentType; }>; __LOADABLE__: boolean; } export interface IRouteWrapper { (props: any): React.ComponentType; } export interface RouteItemProps extends Omit { children?: RouteItemProps[]; path?: string; redirect?: string; component?: React.ComponentType> | React.ComponentType | IDynamicImportComponent; routeWrappers?: IRouteWrapper[]; wrappers?: IRouteWrapper[]; pageConfig?: any; getInitialProps?: any; } interface IModifyFn { (routes: RouteItemProps[]): RouteItemProps[]; } export interface IModifyRoutes { (modifyFn: IModifyFn): void; } export {}; }