aboutsummaryrefslogtreecommitdiffstats
path: root/node_modules/rxjs/dist/esm/internal/observable/throwError.js
blob: bf39a7e508b2d187e530b33524a3f2d3478fe317 (plain) (blame)
1
2
3
4
5
6
7
8
import { Observable } from '../Observable';
import { isFunction } from '../util/isFunction';
export function throwError(errorOrErrorFactory, scheduler) {
    const errorFactory = isFunction(errorOrErrorFactory) ? errorOrErrorFactory : () => errorOrErrorFactory;
    const init = (subscriber) => subscriber.error(errorFactory());
    return new Observable(scheduler ? (subscriber) => scheduler.schedule(init, 0, subscriber) : init);
}
//# sourceMappingURL=throwError.js.map
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage