import { MetadataStorage , DChoice , DOption , Modifier } from "../.." ; export function Choice ( name , value ) ; export function Choice ( name , value ) ; export function Choice ( name , value ) { return async ( target , key , index ) => { MetadataStorage . instance . addModifier ( Modifier . create < DOption > ( async ( original ) => { original . choices = [ ... original . choices , DChoice . create ( name , value ) , ] ; } , DOption ) . decorate ( target . constructor , key , target [ key ] , target . constructor , index ) ) ; } ; }