import { Capivara } from '../' ; export interface ComponentInterface { description tag ? : string ; description template : string ; description controllerAs ? : string ; description style ? : string ; description constants ? : string [ ] ; description functions ? : string [ ] ; description bindings ? : string [ ] ; } export const Component = ( componentConfig ) => { return ( target ) => { const config = { template : componentConfig . template , style : componentConfig . style , constants : componentConfig . constants , functions : componentConfig . functions , bindings : componentConfig . bindings , controllerAs : componentConfig . controllerAs , controller : target , } ; Capivara . component ( componentConfig . tag , config ) ; } ; } ;