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