Skip to content

SudoSOS Back-end API / helpers / validateSpecification

Function: validateSpecification() ​

ts
function validateSpecification<T, F>(target, specifications): Promise<Either<Joinable, T>>;

Function that validates the given param against a specification.

Type Parameters ​

Type Parameter
T
F extends Joinable

Parameters ​

ParameterTypeDescription
targetTObject to verify
specificationsSpecification<T, F>Specification to use

Returns ​

Promise<Either<Joinable, T>>