/** * Created by MeePwn * https://github.com/maybewaityou * * description: * */ import { History, Location, LocationDescriptor, LocationState, Path } from 'history'; import { Map } from 'immutable'; import { Component, ReactNode } from 'react'; import { match } from 'react-router'; import { RouteComponentProps } from 'react-router'; import { Dispatch, Middleware, Reducer, ReducersMapObject, Store } from 'redux'; import { ActionsObservable, StateObservable } from 'redux-observable'; import { Observable } from 'rxjs'; declare enum PlatformType { NATIVE, FRONTEND, } declare const actions: any; declare const models: any[]; declare const _history: any; declare const bind: any; declare const store: any; declare const connect: any; declare function defaultMapDispatchToProps(dispatch: any); type ActionType = string | symbol; declare interface IAction { type: ActionType; payload?: any; } declare const actionCreator: (actionType: ActionType, payload?: any) => IAction; declare const createAction: (actionType: ActionType) => (payload?: any) => IAction; declare const dispatch: any; declare function flowable(action: IAction): Observable; declare function actionStream(type: string, payload?: any): Observable; declare const acceptActions: (reducer: any, actions?: any) => any; declare const ignoreActions: (reducer: any, actions?: any) => any; declare type BatchActionType = 'BATCHING_REDUCER.BATCH_ACTIONS'; declare const BATCH_ACTIONS: BatchActionType; declare interface IBatchAction extends IAction { type: BatchActionType; payload: IAction[]; } declare function batchActions(actions: IAction[], type?: string): IBatchAction; type Dispatch = (action: A) => A; type Middleware = (api: IMiddlewareAPI) => (next: Dispatch) => Dispatch; declare interface IMiddlewareAPI { dispatch: Dispatch; getState(): S; } declare const createImmutableActionMiddleware: (ingoreActionTypes?: string[]) => Middleware; declare const createThunkMiddleware: (store: any) => Middleware; declare const loggerMiddleware: (store: any) => Middleware; declare const epicCreator: (action$: any) => (actionType: string | symbol) => (nextAction: any) => typeof Observable; declare type ActionsObservable = ActionsObservable; declare type StateObservable = StateObservable; type IEpic = (action$: ActionsObservable, store: any, dependencies?: any) => any; declare function mutate(state: Map, mutation: any): Map; declare function unboxing(params: any): any; type Selector = (state: S) => R; type OutputSelector = Selector & { resultFunc: C; recomputations: () => number; resetRecomputations: () => number; }; declare function createSelector( selectors: [Selector], combiner: (...res: R1[]) => T, ): OutputSelector T>; declare function createSelectorCreator(memoize: (func: F) => F): typeof createSelector; declare function createSelectorCreator(memoize: (func: F, option1: O1) => F, option1: O1): typeof createSelector; declare function createSelectorCreator( memoize: (func: F, option1: O1, option2: O2) => F, option1: O1, option2: O2, ): typeof createSelector; declare function createSelectorCreator( memoize: (func: F, option1: O1, option2: O2, option3: O3, ...rest: any[]) => F, option1: O1, option2: O2, option3: O3, ...rest: any[], ): typeof createSelector; interface IProviderProps { store: any; children: ReactNode; } declare class Provider extends Component {} declare interface IRouteConfigComponentProps extends RouteComponentProps { route?: IRouteConfig; } declare type AsyncComponent = () => Promise | any; declare type AsyncRoute = () => Promise | {}>> | any; declare interface IRouteConfig { location?: Location; component?: React.ComponentType | {}> | AsyncRoute; path?: string; exact?: boolean; strict?: boolean; routes?: IRouteConfig[]; } declare const renderRoutes: (routes: IRouteConfig[], extraProps?: any, switchProps?: any) => any; declare const routeLoader: (asyncRoute: AsyncRoute) => any; declare const dynamic: (config: any) => any; declare const mario: any; declare interface IConnectedRouterProps { store?: Store; history: History; } declare class ConnectedRouter extends Component> {} declare const LOCATION_CHANGE = '@@router/LOCATION_CHANGE'; declare interface IRouterState { location: Location | null; } declare const routerReducer: Reducer; declare const CALL_HISTORY_METHOD = '@@router/CALL_HISTORY_METHOD'; declare function push(location: LocationDescriptor, state?: LocationState): IRouterAction; declare function replace(location: LocationDescriptor, state?: LocationState): IRouterAction; declare function go(n: number): IRouterAction; declare function goBack(): IRouterAction; declare function goForward(): IRouterAction; declare const IRouterActions: { push: typeof push; replace: typeof replace; go: typeof go; goBack: typeof goBack; goForward: typeof goForward; }; declare interface ILocationActionPayload { method: string; args?: any[]; } declare interface IRouterAction { type: typeof CALL_HISTORY_METHOD; payload: ILocationActionPayload; } declare interface ILocationChangeAction { type: typeof LOCATION_CHANGE; payload: Location & { props?: { match: { path: string; url: string; params: any; isExact: boolean; }; location: Location; history: History; }; }; } declare function routerMiddleware(history: History): Middleware; declare interface IRedirectProps { to: LocationDescriptor; push?: boolean; from?: string; path?: string; exact?: boolean; strict?: boolean; } declare class Redirect extends Component {} declare interface IRouteProps { location?: Location; component?: React.ComponentType> | React.ComponentType; render?: ((props: RouteComponentProps) => React.ReactNode); children?: ((props: RouteComponentProps) => React.ReactNode) | React.ReactNode; path?: string; exact?: boolean; strict?: boolean; } declare class Route extends Component {} declare interface ISwitchProps { children?: React.ReactNode; location?: Location; } declare class Switch extends Component {} declare interface ILinkProps extends React.AnchorHTMLAttributes { to: LocationDescriptor; replace?: boolean; } declare interface ILinkProps extends React.AnchorHTMLAttributes { to: LocationDescriptor; replace?: boolean; } declare class Link extends Component {} declare interface INavLinkProps extends ILinkProps { activeClassName?: string; activeStyle?: React.CSSProperties; exact?: boolean; strict?: boolean; location?: Location; isActive?

(match: match

, location: Location): boolean; } declare class NavLink extends Component {}