@rkmodules/rules 0.0.80 → 0.0.82
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/index.cjs.js +18 -4
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +18 -4
- package/dist/index.esm.js.map +1 -1
- package/dist/lib/Engine/index.d.ts +2 -1
- package/dist/lib/Engine/types.d.ts +2 -1
- package/package.json +1 -1
|
@@ -34,7 +34,8 @@ export declare class Engine {
|
|
|
34
34
|
private listeners;
|
|
35
35
|
private cache;
|
|
36
36
|
private cacheMiss;
|
|
37
|
-
|
|
37
|
+
env: Record<string, any>;
|
|
38
|
+
constructor(morePrimitives?: Record<string, PrimitiveFunction>, env?: Record<string, any>);
|
|
38
39
|
private checkCache;
|
|
39
40
|
private runGraph;
|
|
40
41
|
/**
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Engine } from ".";
|
|
1
2
|
import { Tree } from "../DataTree";
|
|
2
3
|
/**
|
|
3
4
|
* type definition of rule inputs and outputs
|
|
@@ -32,7 +33,7 @@ export type PrimitiveFunction = {
|
|
|
32
33
|
params?: Record<string, VarDef>;
|
|
33
34
|
inputs?: Record<string, VarDef>;
|
|
34
35
|
outputs?: Record<string, VarDef>;
|
|
35
|
-
impl: (inputs: RecOfTrees, params: Record<string, any
|
|
36
|
+
impl: (inputs: RecOfTrees, params: Record<string, any>, engine: Engine) => Promise<RecOfTrees>;
|
|
36
37
|
mount?: (trigger: () => void) => (() => void) | void;
|
|
37
38
|
};
|
|
38
39
|
/**
|