Skip to content

Commit a15c3d6

Browse files
Undo ES6 output Support
1 parent 0e88eb1 commit a15c3d6

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
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": {

src/typescript-ioc.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff 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)

0 commit comments

Comments
 (0)