@twin.org/modules 0.0.2-next.19 → 0.0.2-next.21

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.
@@ -63,6 +63,7 @@ class ModuleHelper {
63
63
  * @returns The result of the method execution.
64
64
  * @throws GeneralError if executing the module entry failed.
65
65
  */
66
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
66
67
  static async getModuleMethod(module, method) {
67
68
  const methodParts = method.split(".");
68
69
  if (methodParts.length === 2) {
@@ -61,6 +61,7 @@ class ModuleHelper {
61
61
  * @returns The result of the method execution.
62
62
  * @throws GeneralError if executing the module entry failed.
63
63
  */
64
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
64
65
  static async getModuleMethod(module, method) {
65
66
  const methodParts = method.split(".");
66
67
  if (methodParts.length === 2) {
@@ -29,7 +29,7 @@ export declare class ModuleHelper {
29
29
  * @returns The result of the method execution.
30
30
  * @throws GeneralError if executing the module entry failed.
31
31
  */
32
- static getModuleMethod<T>(module: string, method: string): Promise<(...args: unknown[]) => T>;
32
+ static getModuleMethod<T extends (...args: any[]) => any = (...args: any[]) => any>(module: string, method: string): Promise<T>;
33
33
  /**
34
34
  * Execute the method in the module.
35
35
  * @param module The module.
package/docs/changelog.md CHANGED
@@ -1,5 +1,42 @@
1
1
  # @twin.org/modules - Changelog
2
2
 
3
+ ## [0.0.2-next.21](https://github.com/twinfoundation/framework/compare/modules-v0.0.2-next.20...modules-v0.0.2-next.21) (2025-10-09)
4
+
5
+
6
+ ### Features
7
+
8
+ * locales validation ([#197](https://github.com/twinfoundation/framework/issues/197)) ([55fdadb](https://github.com/twinfoundation/framework/commit/55fdadb13595ce0047f787bd1d4135d429a99f12))
9
+
10
+
11
+ ### Dependencies
12
+
13
+ * The following workspace dependencies were updated
14
+ * dependencies
15
+ * @twin.org/core bumped from 0.0.2-next.20 to 0.0.2-next.21
16
+ * @twin.org/nameof bumped from 0.0.2-next.20 to 0.0.2-next.21
17
+ * devDependencies
18
+ * @twin.org/nameof-transformer bumped from 0.0.2-next.20 to 0.0.2-next.21
19
+ * @twin.org/nameof-vitest-plugin bumped from 0.0.2-next.20 to 0.0.2-next.21
20
+ * @twin.org/validate-locales bumped from 0.0.2-next.20 to 0.0.2-next.21
21
+
22
+ ## [0.0.2-next.20](https://github.com/twinfoundation/framework/compare/modules-v0.0.2-next.19...modules-v0.0.2-next.20) (2025-10-02)
23
+
24
+
25
+ ### Features
26
+
27
+ * improve Is.function and ModuleHelper.getModuleMethod signatures ([ecf968b](https://github.com/twinfoundation/framework/commit/ecf968b02934b3676be4bf7cd2d1e7f8e7af6ce2))
28
+
29
+
30
+ ### Dependencies
31
+
32
+ * The following workspace dependencies were updated
33
+ * dependencies
34
+ * @twin.org/core bumped from 0.0.2-next.19 to 0.0.2-next.20
35
+ * @twin.org/nameof bumped from 0.0.2-next.19 to 0.0.2-next.20
36
+ * devDependencies
37
+ * @twin.org/nameof-transformer bumped from 0.0.2-next.19 to 0.0.2-next.20
38
+ * @twin.org/nameof-vitest-plugin bumped from 0.0.2-next.19 to 0.0.2-next.20
39
+
3
40
  ## [0.0.2-next.19](https://github.com/twinfoundation/framework/compare/modules-v0.0.2-next.18...modules-v0.0.2-next.19) (2025-09-30)
4
41
 
5
42
 
@@ -82,7 +82,7 @@ GeneralError if getting the module entry failed.
82
82
 
83
83
  ### getModuleMethod()
84
84
 
85
- > `static` **getModuleMethod**\<`T`\>(`module`, `method`): `Promise`\<(...`args`) => `T`\>
85
+ > `static` **getModuleMethod**\<`T`\>(`module`, `method`): `Promise`\<`T`\>
86
86
 
87
87
  Get the method from a module.
88
88
 
@@ -90,7 +90,7 @@ Get the method from a module.
90
90
 
91
91
  ##### T
92
92
 
93
- `T`
93
+ `T` *extends* (...`args`) => `any` = (...`args`) => `any`
94
94
 
95
95
  #### Parameters
96
96
 
@@ -108,7 +108,7 @@ The method to execute from the module, use dot notation to get a static class me
108
108
 
109
109
  #### Returns
110
110
 
111
- `Promise`\<(...`args`) => `T`\>
111
+ `Promise`\<`T`\>
112
112
 
113
113
  The result of the method execution.
114
114
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/modules",
3
- "version": "0.0.2-next.19",
3
+ "version": "0.0.2-next.21",
4
4
  "description": "Helper classes for loading and executing from modules",
5
5
  "repository": {
6
6
  "type": "git",
@@ -14,8 +14,8 @@
14
14
  "node": ">=20.0.0"
15
15
  },
16
16
  "dependencies": {
17
- "@twin.org/core": "0.0.2-next.19",
18
- "@twin.org/nameof": "0.0.2-next.19"
17
+ "@twin.org/core": "0.0.2-next.21",
18
+ "@twin.org/nameof": "0.0.2-next.21"
19
19
  },
20
20
  "main": "./dist/cjs/index.cjs",
21
21
  "module": "./dist/esm/index.mjs",
@@ -34,5 +34,19 @@
34
34
  "dist/types",
35
35
  "locales",
36
36
  "docs"
37
- ]
37
+ ],
38
+ "keywords": [
39
+ "twin",
40
+ "trade",
41
+ "iota",
42
+ "framework",
43
+ "blockchain",
44
+ "core",
45
+ "foundation",
46
+ "utilities"
47
+ ],
48
+ "bugs": {
49
+ "url": "git+https://github.com/twinfoundation/framework/issues"
50
+ },
51
+ "homepage": "https://twindev.org"
38
52
  }