import { Property } from '@mockingbird/reflect' ; import { ValueHandler } from '../types/value-handler.interface' ; import { Service } from 'typedi' ; @ Service ( ) export class ObjectLiteralValueHandler implements ValueHandler { public shouldHandle ( property ) { const { decoratorValue } = property ; return decoratorValue . isObject ( ) && ! decoratorValue . isMultiClass ( ) && ! decoratorValue . isEnum ( ) ; } public produceValue ( propertyDto ) { return propertyDto . decoratorValue . value ; } }