UNPKG

@capimjs/library-auth

Version:

Professional API using Clean Architecture and TDD. to group validators

8 lines (7 loc) 279 B
export interface ValidationError { unauthorized: () => any; badRequest: (error: Error) => any; serverError: (error: Error) => any; notFound: (error: Error) => any; } export declare function validateError<T>(error: Error, validationFunctions: ValidationError): T;