@shopify/app-bridge-host
Version:
App Bridge Host contains middleware and components that are meant to be consumed by the app's host. The middleware and `Frame` component are responsible for facilitating messages posted between the client and host, and used to act on actions sent from the
14 lines (13 loc) • 656 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
var Error_1 = require("@shopify/app-bridge/actions/Error");
function appBridgeMiddlewareProptype(object, key, componentName /*, ...rest: any[]*/) {
var propValue = object[key];
if (!propValue ||
!propValue.load ||
(propValue.load && !(typeof propValue.load === 'function'))) {
return Error_1.fromAction("Expected an instance of the App Bridge middleware for `" + key + "` in `" + componentName + "`", Error_1.AppActionType.MISSING_APP_BRIDGE_MIDDLEWARE);
}
return null;
}
exports.appBridgeMiddlewareProptype = appBridgeMiddlewareProptype;