import { Observable } from 'rxjs'; import { RpcError } from '../common/error'; /** * Converts a non-reactive gRPC error to an error type provided by this package. * @param error The error to be converted. */ export declare function toReactiveError(error: unknown): RpcError; /** * Converts a gRPC error provided by this package, or a generic non-gRPC error, to an error type understood by gRPC. * A non-gRPC error is treated as "unknown" and details are discarded due to security concerns. * @param error The error to be converted. */ export declare function toNonReactiveError(error: unknown): { code: number; message: string; }; /** * Maps an observable to a new observable whose errors are converted with the help of a mapping function. * @param observable Observable to be mapped. * @param mappingFunction Error type mapping function. */ export declare function mapObservableErrors(observable: Observable, mappingFunction: (err: unknown) => unknown): Observable;