Last change
on this file since bdd6491 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
776 bytes
|
Line | |
---|
1 | /** PURE_IMPORTS_START _Subscriber,_symbol_rxSubscriber,_Observer PURE_IMPORTS_END */
|
---|
2 | import { Subscriber } from '../Subscriber';
|
---|
3 | import { rxSubscriber as rxSubscriberSymbol } from '../symbol/rxSubscriber';
|
---|
4 | import { empty as emptyObserver } from '../Observer';
|
---|
5 | export function toSubscriber(nextOrObserver, error, complete) {
|
---|
6 | if (nextOrObserver) {
|
---|
7 | if (nextOrObserver instanceof Subscriber) {
|
---|
8 | return nextOrObserver;
|
---|
9 | }
|
---|
10 | if (nextOrObserver[rxSubscriberSymbol]) {
|
---|
11 | return nextOrObserver[rxSubscriberSymbol]();
|
---|
12 | }
|
---|
13 | }
|
---|
14 | if (!nextOrObserver && !error && !complete) {
|
---|
15 | return new Subscriber(emptyObserver);
|
---|
16 | }
|
---|
17 | return new Subscriber(nextOrObserver, error, complete);
|
---|
18 | }
|
---|
19 | //# sourceMappingURL=toSubscriber.js.map
|
---|
Note:
See
TracBrowser
for help on using the repository browser.