Bones/node_modules/rxjs/observable/EmptyObservable.js

33 lines
1.2 KiB
JavaScript
Raw Normal View History

2017-05-17 13:45:25 -04:00
"use strict";
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var Observable_1 = require('../Observable');
var EmptyObservable = (function (_super) {
__extends(EmptyObservable, _super);
function EmptyObservable(scheduler) {
_super.call(this);
this.scheduler = scheduler;
}
EmptyObservable.create = function (scheduler) {
return new EmptyObservable(scheduler);
};
EmptyObservable.dispatch = function (_a) {
var subscriber = _a.subscriber;
subscriber.complete();
};
EmptyObservable.prototype._subscribe = function (subscriber) {
var scheduler = this.scheduler;
if (scheduler) {
return scheduler.schedule(EmptyObservable.dispatch, 0, { subscriber: subscriber });
}
else {
subscriber.complete();
}
};
return EmptyObservable;
}(Observable_1.Observable));
exports.EmptyObservable = EmptyObservable;
//# sourceMappingURL=EmptyObservable.js.map