source: trip-planner-front/node_modules/rxjs/internal/observable/defer.js@ 571e0df

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: 646 bytes
RevLine 
[6a3a178]1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3var Observable_1 = require("../Observable");
4var from_1 = require("./from");
5var empty_1 = require("./empty");
6function defer(observableFactory) {
7 return new Observable_1.Observable(function (subscriber) {
8 var input;
9 try {
10 input = observableFactory();
11 }
12 catch (err) {
13 subscriber.error(err);
14 return undefined;
15 }
16 var source = input ? from_1.from(input) : empty_1.empty();
17 return source.subscribe(subscriber);
18 });
19}
20exports.defer = defer;
21//# sourceMappingURL=defer.js.map
Note: See TracBrowser for help on using the repository browser.