This repository has been archived on 2024-07-27. You can view files and clone it, but cannot push or open issues or pull requests.
keksAccountGUI/node_modulesOLD/rxjs/internal/util/toSubscriber.js

21 lines
823 B
JavaScript
Raw Normal View History

2019-08-11 18:48:02 +00:00
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var Subscriber_1 = require("../Subscriber");
var rxSubscriber_1 = require("../symbol/rxSubscriber");
var Observer_1 = require("../Observer");
function toSubscriber(nextOrObserver, error, complete) {
if (nextOrObserver) {
if (nextOrObserver instanceof Subscriber_1.Subscriber) {
return nextOrObserver;
}
if (nextOrObserver[rxSubscriber_1.rxSubscriber]) {
return nextOrObserver[rxSubscriber_1.rxSubscriber]();
}
}
if (!nextOrObserver && !error && !complete) {
return new Subscriber_1.Subscriber(Observer_1.empty);
}
return new Subscriber_1.Subscriber(nextOrObserver, error, complete);
}
exports.toSubscriber = toSubscriber;
//# sourceMappingURL=toSubscriber.js.map