@rkmodules/rules 0.0.99 → 0.0.100

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.
@@ -12,12 +12,12 @@ export interface Ref {
12
12
  export declare function normalizeVarDef(varDef: VarDef): NormalizedVarDef;
13
13
  export declare function getReferences(inputs: VarRef): Ref[];
14
14
  export declare function topSort(fn: GraphedFunction): GraphedFunction;
15
- interface ExecutionContext {
15
+ export interface ExecutionContext {
16
16
  scope: Record<string, Record<string, Tree<any>>>;
17
17
  timings: Record<string, number>;
18
18
  activations: Record<string, boolean>;
19
19
  }
20
- interface EngineStartEvent {
20
+ export interface EngineStartEvent {
21
21
  name: string;
22
22
  inputs: Record<string, Tree<any>>;
23
23
  params: Record<string, any>;
@@ -25,11 +25,13 @@ interface EngineStartEvent {
25
25
  context: ExecutionContext;
26
26
  startTime: number;
27
27
  }
28
- interface EngineEndEvent extends EngineStartEvent {
28
+ export interface EngineEndEvent extends EngineStartEvent {
29
29
  result: RecOfTrees;
30
30
  endTime: number;
31
31
  duration: number;
32
32
  }
33
+ export type EngineEvent = EngineStartEvent | EngineEndEvent;
34
+ export type EngineEventName = "result" | "functionCall" | "functionResult";
33
35
  export declare class Engine {
34
36
  private fnIndex;
35
37
  private listeners;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rkmodules/rules",
3
- "version": "0.0.99",
3
+ "version": "0.0.100",
4
4
  "main": "dist/index.cjs.js",
5
5
  "module": "dist/index.esm.js",
6
6
  "types": "./dist/index.d.ts",