mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-11 08:01:05 +03:30
20 lines
776 B
JavaScript
Vendored
20 lines
776 B
JavaScript
Vendored
/** PURE_IMPORTS_START _Subscriber,_symbol_rxSubscriber,_Observer PURE_IMPORTS_END */
|
|
import { Subscriber } from '../Subscriber';
|
|
import { rxSubscriber as rxSubscriberSymbol } from '../symbol/rxSubscriber';
|
|
import { empty as emptyObserver } from '../Observer';
|
|
export function toSubscriber(nextOrObserver, error, complete) {
|
|
if (nextOrObserver) {
|
|
if (nextOrObserver instanceof Subscriber) {
|
|
return nextOrObserver;
|
|
}
|
|
if (nextOrObserver[rxSubscriberSymbol]) {
|
|
return nextOrObserver[rxSubscriberSymbol]();
|
|
}
|
|
}
|
|
if (!nextOrObserver && !error && !complete) {
|
|
return new Subscriber(emptyObserver);
|
|
}
|
|
return new Subscriber(nextOrObserver, error, complete);
|
|
}
|
|
//# sourceMappingURL=toSubscriber.js.map
|