@gala-chain/api ∙ API
API > createValidDTO
Function: createValidDTO()
createValidDTO\<
T
>(constructor
,plain
):Promise
\<T
>
Creates valid DTO object from provided plain object. Throws exception in case of validation errors.
Type parameters
▪ T extends ChainCallDTO
Parameters
▪ constructor: ClassConstructor
\<T
>
▪ plain: NonFunctionProperties
\<T
>