import { IterableX } from './iterablex' ; class ThrowIterable < TSource > extends IterableX < TSource > { private _error : any ; constructor ( error ) { super ( ) ; this . _error = error ; } * [ Symbol . iterator ] ( ) { throw this . _error ; } } param { * } error returns { AsyncIterableX < never > } export function throwError < TSource = any > ( error ) { return new ThrowIterable < TSource > ( error ) ; }