import { Observable } from 'rxjs' ; import { catchError } from 'rxjs/operators' ; export const mapError = < T , O , R > ( cb ) => ( catchError < O , Observable < O > > ( ( e , $ ) => { throw cb ( e , $ ) ; } ) ) ;