You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
8 lines
522 B
JavaScript
8 lines
522 B
JavaScript
import { Observable } from '../Observable';
|
|
import { isFunction } from '../util/isFunction';
|
|
export function throwError(errorOrErrorFactory, scheduler) {
|
|
var errorFactory = isFunction(errorOrErrorFactory) ? errorOrErrorFactory : function () { return errorOrErrorFactory; };
|
|
var init = function (subscriber) { return subscriber.error(errorFactory()); };
|
|
return new Observable(scheduler ? function (subscriber) { return scheduler.schedule(init, 0, subscriber); } : init);
|
|
}
|
|
//# sourceMappingURL=throwError.js.map
|