mirror of
https://github.com/fooflington/selfdefined.git
synced 2025-06-13 05:55:26 +00:00
update
This commit is contained in:
19
node_modules/rxjs/_esm5/util/toSubscriber.js
generated
vendored
Normal file
19
node_modules/rxjs/_esm5/util/toSubscriber.js
generated
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
/** 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
|
Reference in New Issue
Block a user