@rkmodules/rules 0.0.166 → 0.0.168

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.
@@ -36,14 +36,14 @@ export interface EngineEndEvent extends EngineStartEvent {
36
36
  }
37
37
  export type EngineEvent = EngineStartEvent | EngineEndEvent;
38
38
  export type EngineEventName = "result" | "functionCall" | "functionResult";
39
- export declare class Engine {
39
+ export declare class Engine<Env extends Record<string, any> = Record<string, any>> {
40
40
  private fnIndex;
41
41
  private listeners;
42
42
  private cache;
43
43
  private cacheMiss;
44
44
  private context;
45
- env: Record<string, any>;
46
- constructor(morePrimitives?: Record<string, PrimitiveFunction>, env?: Record<string, any>);
45
+ env: Env;
46
+ constructor(morePrimitives?: Record<string, PrimitiveFunction>, env?: Env);
47
47
  private checkCache;
48
48
  private runGraph;
49
49
  /**
@@ -9,7 +9,7 @@ type FlowContextState = {
9
9
  prompts?: Prompts;
10
10
  };
11
11
  export declare const FlowContext: React.Context<FlowContextState>;
12
- export declare const useEngine: () => Engine;
12
+ export declare const useEngine: () => Engine<Record<string, any>>;
13
13
  export declare const useControls: () => {};
14
14
  export declare const useGraphedFunction: () => GraphedFunction;
15
15
  export declare const usePrompts: () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rkmodules/rules",
3
- "version": "0.0.166",
3
+ "version": "0.0.168",
4
4
  "main": "dist/index.cjs.js",
5
5
  "module": "dist/index.esm.mjs",
6
6
  "types": "./dist/index.d.ts",