module import * as g from 'window-or-global' ; import 'reflect-metadata' ; hidden export const optionalMetadataKey = g . ConvectorOptionalParamMetadataKey || Symbol ( 'optional-param' ) ; g . ConvectorOptionalParamMetadataKey = optionalMetadataKey ; decorator export function OptionalParam < T > ( ) { return ( target , propertyKey , parameterIndex ) => { const optionals = Reflect . getOwnMetadata ( optionalMetadataKey , target , propertyKey ) || [ ] ; optionals . push ( parameterIndex ) ; Reflect . defineMetadata ( optionalMetadataKey , optionals , target , propertyKey ) ; } ; }