@shopify/app-bridge-host
Version:
App Bridge Host contains components and middleware to be consumed by the app's host, as well as the host itself. The middleware and `Frame` component are responsible for facilitating communication between the client and host, and used to act on actions se
36 lines (35 loc) • 1.28 kB
TypeScript
import { AnyAction, ActionCreatorsMapObject } from 'redux';
import type { Feature } from '../../../../withFeature';
export declare const SET_LEGACY = "PRIVATE_APP::SET_LEGACY";
export interface SetLegacyAction {
readonly type: typeof SET_LEGACY;
payload: boolean;
}
export declare function setLegacy(payload: boolean): SetLegacyAction;
interface LegacyActionsCreatorsMap extends ActionCreatorsMapObject {
setLegacy: typeof setLegacy;
}
export declare const defaultLegacyStore = false;
/**
* @internal
*/
export declare const legacyActionCreatorsMap: LegacyActionsCreatorsMap;
/**
* The interface props that are passed down to the Legacy component
* as a the result of calling the `withFeature` decorator
* @internal
* */
export interface WithFeature {
store: boolean;
actions: LegacyActionsCreatorsMap;
}
export default function legacyReducer(state: boolean | undefined, action: AnyAction): boolean;
/**
* An object containing the key, actions, initial state and reducer of the Legacy feature
* Can be used with the `withFeature` decorator to add the reducer
* and then make its actions and store available to the wrapped component
* @public
* @beta
* */
export declare const feature: Feature<WithFeature['store'], WithFeature['actions']>;
export {};