UNPKG
@capimjs/library-auth
Version:
latest (1.0.5)
1.0.5
1.0.4
1.0.3
1.0.2
1.0.1
Professional API using Clean Architecture and TDD. to group validators
@capimjs/library-auth
/
dist
/
application
/
errors
/
validate-error.d.ts
8 lines
(7 loc)
•
279 B
TypeScript
View Raw
1
2
3
4
5
6
7
8
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;