You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
421 B
13 lines
421 B
4 years ago
|
import { Observable } from '../Observable';
|
||
|
export function throwError(error, scheduler) {
|
||
|
if (!scheduler) {
|
||
|
return new Observable(subscriber => subscriber.error(error));
|
||
|
}
|
||
|
else {
|
||
|
return new Observable(subscriber => scheduler.schedule(dispatch, 0, { error, subscriber }));
|
||
|
}
|
||
|
}
|
||
|
function dispatch({ error, subscriber }) {
|
||
|
subscriber.error(error);
|
||
|
}
|
||
|
//# sourceMappingURL=throwError.js.map
|