import { ErrorType } from '../../components/models';

export interface ErrorMapper {
  /**
   * Maps the given error to a new error.
   * @param error the error to map
   * @param currentlyMappedError the error that was mapped by a previous error mapper
   * @returns the mapped error or undefined if the error could not be mapped
   */
  (error: ErrorType, currentlyMappedError?: ErrorType): ErrorType | undefined;
}
