|
@@ -13,7 +13,7 @@ class _Injector {
|
13
|
13
|
* @param {Type<any>} target
|
14
|
14
|
* @returns {T}
|
15
|
15
|
*/
|
16
|
|
- public resolve<T>(target: Type<T>): T {
|
|
16
|
+ public resolve<T>(target: Constructor<T>): T {
|
17
|
17
|
if (!this.initialized) {
|
18
|
18
|
this.initialize()
|
19
|
19
|
this.initialized = true
|
|
@@ -55,7 +55,7 @@ class _Injector {
|
55
|
55
|
const inj = this.injectionQueue.shift()
|
56
|
56
|
|
57
|
57
|
if (this.moduleObjs[inj.injectionType.name]) {
|
58
|
|
- inj.prototype[inj.injectIntoKey] = this.moduleObjs[inj.injectionType.name]
|
|
58
|
+ this.moduleObjs[inj.instance.constructor.name][inj.injectIntoKey] = this.moduleObjs[inj.injectionType.name]
|
59
|
59
|
} else {
|
60
|
60
|
throw new Error("Cannot resolve injection token " + inj.injectionType.name)
|
61
|
61
|
}
|