Sha256: 3a75c186ac90cfa29f4ecf145abd2b1d6f5844a283c7e38f7a413be26f687548

Contents?: true

Size: 1.87 KB

Versions: 49

Compression:

Stored size: 1.87 KB

Contents

"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');
/**
 * We need this JSDoc comment for affecting ESDoc.
 * @extends {Ignored}
 * @hide true
 */
var ScalarObservable = (function (_super) {
    __extends(ScalarObservable, _super);
    function ScalarObservable(value, scheduler) {
        _super.call(this);
        this.value = value;
        this.scheduler = scheduler;
        this._isScalar = true;
        if (scheduler) {
            this._isScalar = false;
        }
    }
    ScalarObservable.create = function (value, scheduler) {
        return new ScalarObservable(value, scheduler);
    };
    ScalarObservable.dispatch = function (state) {
        var done = state.done, value = state.value, subscriber = state.subscriber;
        if (done) {
            subscriber.complete();
            return;
        }
        subscriber.next(value);
        if (subscriber.closed) {
            return;
        }
        state.done = true;
        this.schedule(state);
    };
    /** @deprecated internal use only */ ScalarObservable.prototype._subscribe = function (subscriber) {
        var value = this.value;
        var scheduler = this.scheduler;
        if (scheduler) {
            return scheduler.schedule(ScalarObservable.dispatch, 0, {
                done: false, value: value, subscriber: subscriber
            });
        }
        else {
            subscriber.next(value);
            if (!subscriber.closed) {
                subscriber.complete();
            }
        }
    };
    return ScalarObservable;
}(Observable_1.Observable));
exports.ScalarObservable = ScalarObservable;
//# sourceMappingURL=ScalarObservable.js.map

Version data entries

49 entries across 49 versions & 4 rubygems

Version Path
govuk_publishing_components-16.21.0 node_modules/rxjs/observable/ScalarObservable.js
govuk_publishing_components-16.20.1 node_modules/rxjs/observable/ScalarObservable.js
govuk_publishing_components-16.20.0 node_modules/rxjs/observable/ScalarObservable.js
govuk_publishing_components-16.19.0 node_modules/rxjs/observable/ScalarObservable.js
govuk_publishing_components-16.18.0 node_modules/rxjs/observable/ScalarObservable.js
govuk_publishing_components-16.17.0 node_modules/rxjs/observable/ScalarObservable.js
locomotivecms-4.0.0.alpha1 app/javascript/node_modules/inquirer/node_modules/rxjs/observable/ScalarObservable.js
locomotivecms-3.4.0 app/javascript/node_modules/rxjs/observable/ScalarObservable.js
dragonfly_puppeteer-0.1.0 node_modules/rxjs/observable/ScalarObservable.js