import { AnyClass } from '@boostercloud/framework-types' ; import { ClassMetadata , PropertyMetadata } from 'metadata-booster' ; import 'reflect-metadata' ; export function getPropertiesMetadata ( classType ) { const meta = Reflect . getMetadata ( 'booster:typeinfo' , classType ) ; if ( ! meta ) { console . log ( `Couldn't get proper metadata information of ${ classType . name }` ) ; return [ ] ; } return meta . fields ; } param { Function } func returns { Array } export function getFunctionArguments ( func ) { const args = func . toString ( ) . match ( /([^(])*\(([^)]*)\)/ ) ?. [ 2 ] ; if ( ! args ) return [ ] ; return args . split ( ', ' ) . map ( function ( arg ) { return arg . replace ( /\/\*.*\*\// , '' ) . trim ( ) ; } ) . filter ( function ( arg ) { return arg ; } ) ; }