Browse Source

refactor: improves type of isServiceContainer

e22m4u 1 month ago
parent
commit
b77a2dfd1e
2 changed files with 6 additions and 2 deletions
  1. 1 1
      package.json
  2. 5 1
      src/utils/is-service-container.d.ts

+ 1 - 1
package.json

@@ -52,7 +52,7 @@
     "eslint": "~9.37.0",
     "eslint-config-prettier": "~10.1.8",
     "eslint-plugin-chai-expect": "~3.1.0",
-    "eslint-plugin-jsdoc": "~61.0.0",
+    "eslint-plugin-jsdoc": "~61.1.1",
     "eslint-plugin-mocha": "~11.2.0",
     "globals": "~16.4.0",
     "husky": "~9.1.7",

+ 5 - 1
src/utils/is-service-container.d.ts

@@ -1,6 +1,10 @@
+import {ServiceContainer} from '../service-container.js';
+
 /**
  * Определяет, является ли аргумент сервис-контейнером.
  *
  * @param container
  */
-export declare function isServiceContainer(container: unknown): boolean;
+export declare function isServiceContainer(
+  container: unknown,
+): container is ServiceContainer;