http-problem-details-mapper
Version:
Mapper functions for http-problem-details
13 lines (12 loc) • 435 B
TypeScript
import { ProblemDocument } from 'http-problem-details';
declare type ErrorConstructor = new (...args: any[]) => Error;
export interface IErrorMapper {
readonly error: string;
mapError(error: Error): ProblemDocument;
}
export declare abstract class ErrorMapper implements IErrorMapper {
readonly error: string;
constructor(ErrorType: ErrorConstructor);
abstract mapError(error: Error): ProblemDocument;
}
export {};