UNPKG

336 BJavaScriptView Raw
1import { IterableX } from './iterablex';
2class ThrowIterable extends IterableX {
3 constructor(error) {
4 super();
5 this._error = error;
6 }
7 *[Symbol.iterator]() {
8 throw this._error;
9 }
10}
11export function throwError(error) {
12 return new ThrowIterable(error);
13}
14
15//# sourceMappingURL=throwerror.mjs.map