1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.appBridgeMiddlewareProptype = void 0;
|
4 | var Error_1 = require("@shopify/app-bridge/actions/Error");
|
5 | function appBridgeMiddlewareProptype(object, key, componentName /* , ...rest: any[]*/) {
|
6 | var propValue = object[key];
|
7 | if (!propValue ||
|
8 | !propValue.load ||
|
9 | (propValue.load && !(typeof propValue.load === 'function'))) {
|
10 | return Error_1.fromAction("Expected an instance of the App Bridge middleware for `" + key + "` in `" + componentName + "`", Error_1.AppActionType.MISSING_APP_BRIDGE_MIDDLEWARE);
|
11 | }
|
12 | return null;
|
13 | }
|
14 | exports.appBridgeMiddlewareProptype = appBridgeMiddlewareProptype;
|