npm package diff
Package: @forge/bridge
Versions: 4.0.0 - 4.0.1-next.0
File: package/out/flag/flag.js
Index: package/out/flag/flag.js
===================================================================
--- package/out/flag/flag.js
+++ package/out/flag/flag.js
@@ -1,21 +1,23 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.showFlag = void 0;
-const tslib_1 = require("tslib");
const bridge_1 = require("../bridge");
const errors_1 = require("../errors");
const callBridge = (0, bridge_1.getCallBridge)();
const showFlag = (options) => {
var _a;
if (!options.id) {
throw new errors_1.BridgeAPIError('"id" must be defined in flag options');
}
- const result = callBridge('showFlag', Object.assign(Object.assign({}, options), { type: (_a = options.type) !== null && _a !== void 0 ? _a : 'info' }));
+ const result = callBridge('showFlag', {
+ ...options,
+ type: (_a = options.type) !== null && _a !== void 0 ? _a : 'info'
+ });
return {
- close: () => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
- yield result;
+ close: async () => {
+ await result;
return callBridge('closeFlag', { id: options.id });
- })
+ }
};
};
exports.showFlag = showFlag;