Actualizacion maquina principal
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / rxjs / _esm5 / internal / observable / defer.js
1 /** PURE_IMPORTS_START _Observable,_from,_empty PURE_IMPORTS_END */
2 import { Observable } from '../Observable';
3 import { from } from './from';
4 import { empty } from './empty';
5 export function defer(observableFactory) {
6     return new Observable(function (subscriber) {
7         var input;
8         try {
9             input = observableFactory();
10         }
11         catch (err) {
12             subscriber.error(err);
13             return undefined;
14         }
15         var source = input ? from(input) : empty();
16         return source.subscribe(subscriber);
17     });
18 }
19 //# sourceMappingURL=defer.js.map