import type { IDatabaseDataActionInterface } from '../IDatabaseDataAction' ; const ACTION_PARAMS = 'custom:data-viewer/action/params' ; export function databaseDataAction < T extends IDatabaseDataActionInterface < any , any , any > > ( ) { return < U extends T > ( target ) : U => { if ( Reflect . hasOwnMetadata ( ACTION_PARAMS , target ) ) { throw new Error ( 'Duplicate databaseDataAction() decorator' ) ; } const types = Reflect . getMetadata ( 'design:paramtypes' , target ) || [ ] ; Reflect . defineMetadata ( ACTION_PARAMS , types , target ) ; return target ; } ; } export function getDependingDataActions ( action ) { return Reflect . getMetadata ( ACTION_PARAMS , action ) || [ ] ; }