File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed
Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " typescript-ioc" ,
3- "version" : " 0.2.8 " ,
3+ "version" : " 0.2.9 " ,
44 "description" : " A Lightweight annotation-based dependency injection container for typescript." ,
55 "author" :
" Thiago da Rosa de Bustamante <[email protected] >" ,
66 "dependencies" : {
Original file line number Diff line number Diff line change @@ -149,17 +149,15 @@ export function AutoWired(target: Function) {
149149 newArgs . push ( IoCContainer . get ( paramTypes [ index ] ) ) ;
150150 }
151151 }
152- let ret = construct ( target , newArgs , ioc_wrapper ) ;
153- IoCContainer . applyInjections ( ret , target ) ;
154- return ret ;
152+ IoCContainer . applyInjections ( this , target ) ;
153+ target . apply ( this , newArgs ) ;
155154 } , target ) ;
156155 }
157156 else {
158157 newConstructor = InjectorHanlder . decorateConstructor ( function ioc_wrapper ( ...args : any [ ] ) {
159158 IoCContainer . assertInstantiable ( target ) ;
160- let ret = construct ( target , args , ioc_wrapper ) ;
161- IoCContainer . applyInjections ( ret , target ) ;
162- return ret ;
159+ IoCContainer . applyInjections ( this , target ) ;
160+ target . apply ( this , args ) ;
163161 } , target ) ;
164162 }
165163 let config : ConfigImpl = < ConfigImpl > IoCContainer . bind ( target )
You can’t perform that action at this time.
0 commit comments