@twin.org/modules 0.0.2-next.19 → 0.0.2-next.20
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/cjs/index.cjs
CHANGED
|
@@ -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) {
|
package/dist/esm/index.mjs
CHANGED
|
@@ -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<
|
|
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,23 @@
|
|
|
1
1
|
# @twin.org/modules - Changelog
|
|
2
2
|
|
|
3
|
+
## [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)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* improve Is.function and ModuleHelper.getModuleMethod signatures ([ecf968b](https://github.com/twinfoundation/framework/commit/ecf968b02934b3676be4bf7cd2d1e7f8e7af6ce2))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Dependencies
|
|
12
|
+
|
|
13
|
+
* The following workspace dependencies were updated
|
|
14
|
+
* dependencies
|
|
15
|
+
* @twin.org/core bumped from 0.0.2-next.19 to 0.0.2-next.20
|
|
16
|
+
* @twin.org/nameof bumped from 0.0.2-next.19 to 0.0.2-next.20
|
|
17
|
+
* devDependencies
|
|
18
|
+
* @twin.org/nameof-transformer bumped from 0.0.2-next.19 to 0.0.2-next.20
|
|
19
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.2-next.19 to 0.0.2-next.20
|
|
20
|
+
|
|
3
21
|
## [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
22
|
|
|
5
23
|
|
|
@@ -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
|
|
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
|
|
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.
|
|
3
|
+
"version": "0.0.2-next.20",
|
|
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.
|
|
18
|
-
"@twin.org/nameof": "0.0.2-next.
|
|
17
|
+
"@twin.org/core": "0.0.2-next.20",
|
|
18
|
+
"@twin.org/nameof": "0.0.2-next.20"
|
|
19
19
|
},
|
|
20
20
|
"main": "./dist/cjs/index.cjs",
|
|
21
21
|
"module": "./dist/esm/index.mjs",
|
|
@@ -34,5 +34,15 @@
|
|
|
34
34
|
"dist/types",
|
|
35
35
|
"locales",
|
|
36
36
|
"docs"
|
|
37
|
+
],
|
|
38
|
+
"keywords": [
|
|
39
|
+
"twin",
|
|
40
|
+
"trade",
|
|
41
|
+
"iota",
|
|
42
|
+
"framework",
|
|
43
|
+
"blockchain",
|
|
44
|
+
"core",
|
|
45
|
+
"foundation",
|
|
46
|
+
"utilities"
|
|
37
47
|
]
|
|
38
48
|
}
|