Last change
on this file since 76712b2 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
823 bytes
|
Line | |
---|
1 | "use strict";
|
---|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
---|
3 | var Subscriber_1 = require("../Subscriber");
|
---|
4 | var rxSubscriber_1 = require("../symbol/rxSubscriber");
|
---|
5 | var Observer_1 = require("../Observer");
|
---|
6 | function toSubscriber(nextOrObserver, error, complete) {
|
---|
7 | if (nextOrObserver) {
|
---|
8 | if (nextOrObserver instanceof Subscriber_1.Subscriber) {
|
---|
9 | return nextOrObserver;
|
---|
10 | }
|
---|
11 | if (nextOrObserver[rxSubscriber_1.rxSubscriber]) {
|
---|
12 | return nextOrObserver[rxSubscriber_1.rxSubscriber]();
|
---|
13 | }
|
---|
14 | }
|
---|
15 | if (!nextOrObserver && !error && !complete) {
|
---|
16 | return new Subscriber_1.Subscriber(Observer_1.empty);
|
---|
17 | }
|
---|
18 | return new Subscriber_1.Subscriber(nextOrObserver, error, complete);
|
---|
19 | }
|
---|
20 | exports.toSubscriber = toSubscriber;
|
---|
21 | //# sourceMappingURL=toSubscriber.js.map |
---|
Note:
See
TracBrowser
for help on using the repository browser.