aboutsummaryrefslogtreecommitdiff
path: root/sandbox/testAppNevena/Front/node_modules/rxjs/_esm5/internal/Observable.js
diff options
context:
space:
mode:
authorDanijel Andjelkovic <adanijel99@gmail.com>2022-03-01 20:21:29 +0000
committerDanijel Andjelkovic <adanijel99@gmail.com>2022-03-01 20:21:29 +0000
commit61cb1570a3410c85a4489b97c172e3a50715f36c (patch)
tree8fe4a5b77ea54bba80abc817ce2c9ef0e79e7e66 /sandbox/testAppNevena/Front/node_modules/rxjs/_esm5/internal/Observable.js
parent21a53d349788c99d2007cba91a923db982353b31 (diff)
parenta9ee9e0a500a4a15bd0b5dcaf041f827228ed309 (diff)
Merge branch 'researchML' into 'dev'
Research ml See merge request igrannonica/neuronstellar!6
Diffstat (limited to 'sandbox/testAppNevena/Front/node_modules/rxjs/_esm5/internal/Observable.js')
-rw-r--r--sandbox/testAppNevena/Front/node_modules/rxjs/_esm5/internal/Observable.js116
1 files changed, 116 insertions, 0 deletions
diff --git a/sandbox/testAppNevena/Front/node_modules/rxjs/_esm5/internal/Observable.js b/sandbox/testAppNevena/Front/node_modules/rxjs/_esm5/internal/Observable.js
new file mode 100644
index 00000000..8f2ef306
--- /dev/null
+++ b/sandbox/testAppNevena/Front/node_modules/rxjs/_esm5/internal/Observable.js
@@ -0,0 +1,116 @@
+/** PURE_IMPORTS_START _util_canReportError,_util_toSubscriber,_symbol_observable,_util_pipe,_config PURE_IMPORTS_END */
+import { canReportError } from './util/canReportError';
+import { toSubscriber } from './util/toSubscriber';
+import { observable as Symbol_observable } from './symbol/observable';
+import { pipeFromArray } from './util/pipe';
+import { config } from './config';
+var Observable = /*@__PURE__*/ (function () {
+ function Observable(subscribe) {
+ this._isScalar = false;
+ if (subscribe) {
+ this._subscribe = subscribe;
+ }
+ }
+ Observable.prototype.lift = function (operator) {
+ var observable = new Observable();
+ observable.source = this;
+ observable.operator = operator;
+ return observable;
+ };
+ Observable.prototype.subscribe = function (observerOrNext, error, complete) {
+ var operator = this.operator;
+ var sink = toSubscriber(observerOrNext, error, complete);
+ if (operator) {
+ sink.add(operator.call(sink, this.source));
+ }
+ else {
+ sink.add(this.source || (config.useDeprecatedSynchronousErrorHandling && !sink.syncErrorThrowable) ?
+ this._subscribe(sink) :
+ this._trySubscribe(sink));
+ }
+ if (config.useDeprecatedSynchronousErrorHandling) {
+ if (sink.syncErrorThrowable) {
+ sink.syncErrorThrowable = false;
+ if (sink.syncErrorThrown) {
+ throw sink.syncErrorValue;
+ }
+ }
+ }
+ return sink;
+ };
+ Observable.prototype._trySubscribe = function (sink) {
+ try {
+ return this._subscribe(sink);
+ }
+ catch (err) {
+ if (config.useDeprecatedSynchronousErrorHandling) {
+ sink.syncErrorThrown = true;
+ sink.syncErrorValue = err;
+ }
+ if (canReportError(sink)) {
+ sink.error(err);
+ }
+ else {
+ console.warn(err);
+ }
+ }
+ };
+ Observable.prototype.forEach = function (next, promiseCtor) {
+ var _this = this;
+ promiseCtor = getPromiseCtor(promiseCtor);
+ return new promiseCtor(function (resolve, reject) {
+ var subscription;
+ subscription = _this.subscribe(function (value) {
+ try {
+ next(value);
+ }
+ catch (err) {
+ reject(err);
+ if (subscription) {
+ subscription.unsubscribe();
+ }
+ }
+ }, reject, resolve);
+ });
+ };
+ Observable.prototype._subscribe = function (subscriber) {
+ var source = this.source;
+ return source && source.subscribe(subscriber);
+ };
+ Observable.prototype[Symbol_observable] = function () {
+ return this;
+ };
+ Observable.prototype.pipe = function () {
+ var operations = [];
+ for (var _i = 0; _i < arguments.length; _i++) {
+ operations[_i] = arguments[_i];
+ }
+ if (operations.length === 0) {
+ return this;
+ }
+ return pipeFromArray(operations)(this);
+ };
+ Observable.prototype.toPromise = function (promiseCtor) {
+ var _this = this;
+ promiseCtor = getPromiseCtor(promiseCtor);
+ return new promiseCtor(function (resolve, reject) {
+ var value;
+ _this.subscribe(function (x) { return value = x; }, function (err) { return reject(err); }, function () { return resolve(value); });
+ });
+ };
+ Observable.create = function (subscribe) {
+ return new Observable(subscribe);
+ };
+ return Observable;
+}());
+export { Observable };
+function getPromiseCtor(promiseCtor) {
+ if (!promiseCtor) {
+ promiseCtor = config.Promise || Promise;
+ }
+ if (!promiseCtor) {
+ throw new Error('no Promise impl found');
+ }
+ return promiseCtor;
+}
+//# sourceMappingURL=Observable.js.map