@bool-ts/core 1.0.2 → 1.0.3

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.
@@ -10,7 +10,9 @@ export const Injector = new class {
10
10
  if (this._mapper.has(target)) {
11
11
  return this._mapper.get(target);
12
12
  }
13
- if (!Reflect.getOwnMetadataKeys(target).includes(injectableKey)) {
13
+ const ownMetadataKeys = Reflect.getOwnMetadataKeys(target);
14
+ if (!ownMetadataKeys.includes(injectableKey)) {
15
+ console.error("Current metadata keys:", ownMetadataKeys);
14
16
  throw Error("Missing dependency declaration, please check @Injectable() used on dependency(ies).");
15
17
  }
16
18
  // Initialize dependencies injection
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bool-ts/core",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -22,7 +22,10 @@ export const Injector: IInjector = new class {
22
22
  return this._mapper.get(target) as T;
23
23
  }
24
24
 
25
- if (!Reflect.getOwnMetadataKeys(target).includes(injectableKey)) {
25
+ const ownMetadataKeys = Reflect.getOwnMetadataKeys(target);
26
+
27
+ if (!ownMetadataKeys.includes(injectableKey)) {
28
+ console.error("Current metadata keys:", ownMetadataKeys);
26
29
  throw Error("Missing dependency declaration, please check @Injectable() used on dependency(ies).");
27
30
  }
28
31