declare const Reflect ; /**
 * Bind the inputs defined on the target to the directive.
 */ export function bind ( target , directive ) { const annotations = target . __annotations__ ; const component = annotations . component || annotations . directive ; function toBinding ( key , value ) { const match = value . match ( /^([@=<])?(.*)?$/ ) ; if ( match [ 1 ] ) { return { key : match [ 2 ] || key , value : match [ 1 ] + ( match [ 2 ] || key ) } ; } let sign = '@' ; if ( Reflect . hasMetadata ( 'design:type' , target . prototype , key ) ) { const type = Reflect . getMetadata ( 'design:type' , target . prototype , key ) ; if ( type . name !== 'String' && type . name !== 'Number' && type . name !== 'Boolean' ) { sign = '=' ; } } return { key : key , value : sign + value } ; } ( component . inputs || [ ] ) . forEach ( key => { const mapping = key . split ( /:[ ]*/ ) ; const binding = toBinding ( mapping [ 0 ] , mapping [ 1 ] || mapping [ 0 ] ) ; directive . bindToController [ binding . key ] = binding . value ; } ) ; Object . keys ( annotations . inputs || { } ) . forEach ( key => { const binding = toBinding ( key , annotations . inputs [ key ] ) ; directive . bindToController [ binding . key ] = binding . value ; } ) ; }