import * as injector from '../utils/injector' ; export function bootstrap ( ngModule , target ) { const pipe = target . __annotations__ . pipe ; injector . inject ( ngModule , target ) ; const filter = target . $inject || [ ] ; filter . push ( ( ... args ) => { const instance = new target ( ... args ) ; const filter = instance . transform ; filter . $stateful = pipe . pure === false ; return filter ; } ) ; ngModule . filter ( pipe . name , filter ) ; return pipe . name ; }