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