UNPKG

1.05 kBTypeScriptView Raw
1import { Performance as PerformanceActions } from '@shopify/app-bridge/actions';
2import { Feature } from '../withFeature';
3/**
4 * The interface props that are passed down to the Performance component
5 * as a the result of calling the `withFeature` decorator
6 * @public
7 * */
8export interface PerformanceDetails {
9 isFullPageNavigation: boolean;
10 timeOrigin: number;
11}
12export declare type PerformanceStore = PerformanceDetails | null;
13export interface WithFeature {
14 actions: {
15 skeletonPageLoad: typeof PerformanceActions.skeletonPageLoad;
16 fullPageLoad: typeof PerformanceActions.fullPageLoad;
17 };
18 store: PerformanceStore;
19}
20export declare const defaultPerformanceStore: null;
21/**
22 * An object containing the key, actions, initial state and reducer of the Performance feature
23 * Can be used with the `withFeature` decorator to add the reducer
24 * and then make its actions and store available to the wrapped component
25 * @public
26 * */
27export declare const feature: Feature<WithFeature['store'], WithFeature['actions']>;