@dxos/app-graph 0.8.2-main.12df754 → 0.8.2-main.30e4dbb

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/src/node.ts CHANGED
@@ -41,10 +41,10 @@ export type Node<TData = any, TProperties extends Record<string, any> = Record<s
41
41
  data: TData;
42
42
  }>;
43
43
 
44
- export type NodeFilter<T = any, U extends Record<string, any> = Record<string, any>> = (
44
+ export type NodeFilter<TData = any, TProperties extends Record<string, any> = Record<string, any>> = (
45
45
  node: Node<unknown, Record<string, any>>,
46
46
  connectedNode: Node,
47
- ) => node is Node<T, U>;
47
+ ) => node is Node<TData, TProperties>;
48
48
 
49
49
  export type Relation = 'outbound' | 'inbound';
50
50
 
@@ -70,12 +70,12 @@ export type NodeArg<TData, TProperties extends Record<string, any> = Record<stri
70
70
 
71
71
  export type InvokeParams = {
72
72
  /** Node the invoked action is connected to. */
73
- node: Node;
73
+ parent?: Node;
74
74
 
75
75
  caller?: string;
76
76
  };
77
77
 
78
- export type ActionData = (params: InvokeParams) => MaybePromise<void>;
78
+ export type ActionData = (params?: InvokeParams) => MaybePromise<void>;
79
79
 
80
80
  export type Action<TProperties extends Record<string, any> = Record<string, any>> = Readonly<
81
81
  Omit<Node<ActionData, TProperties>, 'properties'> & {