backk-frontend-utils
Advanced tools
Comparing version 1.0.28 to 1.0.29
import { ServiceFunctionType } from '../callRemoteService'; | ||
export default function validateServiceFunctionArgumentOrThrow(serviceFunctionArgument: object, ArgumentClass: new () => any, serviceFunctionType: ServiceFunctionType): Promise<void>; | ||
export default function validateServiceFunctionArgumentOrThrow(serviceFunctionArgument: object, ArgumentClass: new () => any, serviceFunctionType: ServiceFunctionType, propertyName?: string): Promise<void>; |
@@ -54,3 +54,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
} | ||
export default function validateServiceFunctionArgumentOrThrow(serviceFunctionArgument, ArgumentClass, serviceFunctionType) { | ||
export default function validateServiceFunctionArgumentOrThrow(serviceFunctionArgument, ArgumentClass, serviceFunctionType, propertyName) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
@@ -77,3 +77,6 @@ try { | ||
} | ||
throw new Error(getValidationErrors(validationErrors)); | ||
const finalValidationErrors = propertyName | ||
? validationErrors.filter((validationError) => validationError.property === propertyName) | ||
: validationErrors; | ||
throw new Error(getValidationErrors(finalValidationErrors)); | ||
} | ||
@@ -80,0 +83,0 @@ }); |
{ | ||
"name": "backk-frontend-utils", | ||
"version": "1.0.28", | ||
"version": "1.0.29", | ||
"description": "Web frontend utils for Backk microservices", | ||
@@ -5,0 +5,0 @@ "author": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
244827
2348