import { metadata } from '../constants' ; import { PropTagIdentifier } from '../interfaces' ; export const Prop = ( ) => ( target , key , index ? ) : void => { const prop = { name : key , type : Reflect . getMetadata ( metadata . DESIGN_TYPE , target , key ) , value : target [ key ] , } ; const props = Reflect . getMetadata ( metadata . PROPS_IDENTIFIER , target ) || [ ] ; const next = props . concat ( prop ) ; Reflect . defineMetadata ( metadata . PROPS_IDENTIFIER , next , target . constructor ) ; } ;