@deessejs/functions 0.0.42 → 0.0.43
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/context/define.js +3 -4
- package/package.json +1 -1
package/dist/context/define.js
CHANGED
|
@@ -4,16 +4,15 @@ exports.defineContext = defineContext;
|
|
|
4
4
|
function defineContext() {
|
|
5
5
|
return {
|
|
6
6
|
withExtensions: (config) => {
|
|
7
|
-
// Créer un contexte
|
|
7
|
+
// Créer un contexte qui préserve le type TContext
|
|
8
8
|
const runtimeContext = {};
|
|
9
9
|
// Appliquer les extensions en préservant les types
|
|
10
10
|
const result = {
|
|
11
11
|
context: runtimeContext,
|
|
12
12
|
};
|
|
13
13
|
for (const extension of config.extensions) {
|
|
14
|
-
//
|
|
15
|
-
const
|
|
16
|
-
const methods = methodsFactory(runtimeContext);
|
|
14
|
+
// Passer le contexte avec son type complet pour que l'inférence fonctionne
|
|
15
|
+
const methods = extension.functions(runtimeContext);
|
|
17
16
|
Object.assign(result, methods);
|
|
18
17
|
}
|
|
19
18
|
return result;
|
package/package.json
CHANGED