@builder.io/sdk 2.0.5 → 2.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -123,7 +123,7 @@ function assertAllowedPropertyName(name) {
123
123
  throw new Error("Property name \"".concat(name, "\" is not allowed"));
124
124
  }
125
125
 
126
- var version = "2.0.5-0";
126
+ var version = "2.0.5";
127
127
 
128
128
  var Subscription = /** @class */ (function () {
129
129
  function Subscription(listeners, listener) {
@@ -160,9 +160,18 @@ var Subscription = /** @class */ (function () {
160
160
  // TODO: follow minimal basic spec: https://github.com/tc39/proposal-observable
161
161
  var BehaviorSubject = /** @class */ (function () {
162
162
  function BehaviorSubject(value) {
163
+ var _this = this;
163
164
  this.value = value;
164
165
  this.listeners = [];
165
166
  this.errorListeners = [];
167
+ this.then = function () {
168
+ var _a;
169
+ var args = [];
170
+ for (var _i = 0; _i < arguments.length; _i++) {
171
+ args[_i] = arguments[_i];
172
+ }
173
+ return (_a = _this.toPromise()).then.apply(_a, args);
174
+ };
166
175
  }
167
176
  BehaviorSubject.prototype.next = function (value) {
168
177
  this.value = value;