assemblerjs 0.5.0 → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +2 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -49,7 +49,7 @@ export declare abstract class AbstractAssembler extends AbstractEventManager {
|
|
|
49
49
|
abstract use<T>(identifier: string | Symbol, object: T): T;
|
|
50
50
|
abstract prepareInitHook<T = AbstractAssemblage>(instance: T): unknown[];
|
|
51
51
|
abstract has<T>(identifier: Identifier<T>): boolean;
|
|
52
|
-
abstract require<T>(identifier: Identifier<T>): T;
|
|
52
|
+
abstract require<T>(identifier: Identifier<T> | string | Symbol): T;
|
|
53
53
|
abstract tagged(...tags: string[]): any[];
|
|
54
54
|
abstract dispose(): void;
|
|
55
55
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -611,7 +611,7 @@ const getDecoratedParametersIndexes = (t)=>{
|
|
|
611
611
|
};
|
|
612
612
|
};
|
|
613
613
|
|
|
614
|
-
const
|
|
614
|
+
const resolveInjectableParameters = (i)=>{
|
|
615
615
|
const c = [];
|
|
616
616
|
const s = getParamTypes(i.concrete);
|
|
617
617
|
const u = getDecoratedParametersIndexes(i.concrete);
|
|
@@ -692,7 +692,7 @@ class Injectable {
|
|
|
692
692
|
}
|
|
693
693
|
build() {
|
|
694
694
|
if (this.singletonInstance) return this.singletonInstance;
|
|
695
|
-
const t =
|
|
695
|
+
const t = resolveInjectableParameters(this);
|
|
696
696
|
const e = new this.concrete(...t);
|
|
697
697
|
registerEvents(this, e);
|
|
698
698
|
if (this.isSingleton) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "assemblerjs",
|
|
3
3
|
"description": "A general purpose and zero-dependency Dependency Injection library for node and browser.",
|
|
4
|
-
"version": "0.5.
|
|
4
|
+
"version": "0.5.2",
|
|
5
5
|
"author": "Benoît LAHOZ <info@benoitlahoz.io>",
|
|
6
6
|
"bugs": "https://github.com/benoitlahoz/assemblerjs/issues",
|
|
7
7
|
"devDependencies": {
|