UNPKG

823 BTypeScriptView Raw
1import React from 'react';
2import { ApiClientConfig, Application, Middleware } from './types';
3export declare type ReactComponent<P> = React.StatelessComponent<P> | React.ComponentClass<P>;
4export interface Context {
5 appBridgeMiddleware: Middleware;
6}
7export interface DispatchToProps {
8 (app: Application): any;
9}
10export interface WithAppProps<Store> {
11 app: Application;
12 store: Store;
13}
14export interface RequiredProps {
15 config: ApiClientConfig;
16}
17export interface State {
18 mounted: boolean;
19}
20export declare type StoreToProps<Store> = (obj: any) => Store;
21export declare function withApp<Store>(storeToProps?: StoreToProps<Store>, dispatchToProps?: DispatchToProps): <OwnProps>(WrappedComponent: ReactComponent<OwnProps>) => React.ComponentClass<OwnProps & RequiredProps & WithAppProps<Store>, any>;