@shopify/app-bridge
Version:
[](https://travis-ci.com/Shopify/app-bridge) [](https:
20 lines (19 loc) • 780 B
TypeScript
/// <reference types="react" />
import React from 'react';
import { ApiClientConfig, Application, Middleware } from './';
export declare type ReactComponent<P> = React.StatelessComponent<P> | React.ComponentClass<P>;
export interface Context {
appBridgeMiddleware: Middleware;
}
export interface DispatchToProps {
(app: Application): any;
}
export interface WithAppProps<Store> {
app: Application;
store: Store;
}
export interface RequiredProps {
config: ApiClientConfig;
}
export declare type StoreToProps<Store> = (obj: any) => Store;
export declare function withApp<Store>(storeToProps?: StoreToProps<Store>, dispatchToProps?: DispatchToProps): <OwnProps>(WrappedComponent: ReactComponent<OwnProps>) => React.ComponentClass<OwnProps & WithAppProps<Store>>;