import 'reflect-metadata' ; import { CONFIG_PARAMS } from '../constants' ; export const ConfigParam = ( configKey , fallback = undefined ) : ParameterDecorator => ( target , propertyKey , parameterIndex ) => { const existingParameters = Reflect . getMetadata ( CONFIG_PARAMS , target , propertyKey ) || [ ] ; existingParameters . push ( { parameterIndex , propertyKey , configKey , fallback , } ) ; Reflect . defineMetadata ( CONFIG_PARAMS , existingParameters , target , propertyKey ) ; return target ; } ;