Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /var/www/html/queuepro/node_modules/rxjs/_esm2015/observable/ drwxrwxr-x | |
| Viewing file: Select action/file-type: import { Observable } from '../Observable';
import { subscribeToResult } from '../util/subscribeToResult';
import { OuterSubscriber } from '../OuterSubscriber';
/**
* We need this JSDoc comment for affecting ESDoc.
* @extends {Ignored}
* @hide true
*/
export class IfObservable extends Observable {
constructor(condition, thenSource, elseSource) {
super();
this.condition = condition;
this.thenSource = thenSource;
this.elseSource = elseSource;
}
static create(condition, thenSource, elseSource) {
return new IfObservable(condition, thenSource, elseSource);
}
/** @deprecated internal use only */ _subscribe(subscriber) {
const { condition, thenSource, elseSource } = this;
return new IfSubscriber(subscriber, condition, thenSource, elseSource);
}
}
class IfSubscriber extends OuterSubscriber {
constructor(destination, condition, thenSource, elseSource) {
super(destination);
this.condition = condition;
this.thenSource = thenSource;
this.elseSource = elseSource;
this.tryIf();
}
tryIf() {
const { condition, thenSource, elseSource } = this;
let result;
try {
result = condition();
const source = result ? thenSource : elseSource;
if (source) {
this.add(subscribeToResult(this, source));
}
else {
this._complete();
}
}
catch (err) {
this._error(err);
}
}
}
//# sourceMappingURL=IfObservable.js.map |
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0044 ]-- |