@@ -4,7 +4,7 @@ declare type EvalMethods = Record<string, Record<string, Function>>;
44declare type CodeType = undefined | "JSON" | "Function" ;
55
66declare type NodeToValue < NodeT > = NodeT extends Node < infer ValueType > ? ValueType : never ;
7- declare type ValueFn < ValueType > = ( ... paramValues : any [ ] ) => ValueType ;
7+ declare type ValueFn < ValueType > = ( params : Record < string , unknown > ) => ValueType ;
88declare type NodeToNodeFn < NodeT > = Node < ValueFn < NodeToValue < NodeT > > > ;
99declare type FetchInfo = {
1010 /**
@@ -34,9 +34,9 @@ declare type RecordOptionalNodeToValue<T> = {
3434interface Node < T > {
3535 readonly type : string ;
3636 /**
37- * generate a new node, the result is a function with "paramName" as the parameter name
37+ * generate a new node, the result is a function with "params"
3838 */
39- wrapContext ( paramName : string ) : Node < ValueFn < T > > ;
39+ wrapContext ( ) : Node < ValueFn < T > > ;
4040 /**
4141 * calculate evaluate result
4242 * @param exposingNodes other dependent Nodes
@@ -67,7 +67,7 @@ declare abstract class AbstractNode<T> implements Node<T> {
6767 readonly type : string ;
6868 evalCache : EvalCache < T > ;
6969 constructor ( ) ;
70- abstract wrapContext ( paramName : string ) : AbstractNode < ValueFn < T > > ;
70+ abstract wrapContext ( ) : AbstractNode < ValueFn < T > > ;
7171 evaluate ( exposingNodes ?: Record < string , Node < unknown > > , methods ?: EvalMethods ) : T ;
7272 hasCycle ( ) : boolean ;
7373 abstract getChildren ( ) : Node < unknown > [ ] ;
@@ -111,7 +111,7 @@ declare class CachedNode<T> extends AbstractNode<CachedValue<T>> {
111111 type : string ;
112112 child : AbstractNode < T > ;
113113 constructor ( child : AbstractNode < T > ) ;
114- wrapContext ( paramName : string ) : AbstractNode < ValueFn < CachedValue < T > > > ;
114+ wrapContext ( ) : AbstractNode < ValueFn < CachedValue < T > > > ;
115115 filterNodes ( exposingNodes : Record < string , Node < unknown > > ) : Map < Node < unknown > , string [ ] > ;
116116 justEval ( exposingNodes : Record < string , Node < unknown > > , methods ?: EvalMethods ) : CachedValue < T > ;
117117 getChildren ( ) : Node < unknown > [ ] ;
@@ -141,7 +141,7 @@ declare class FunctionNode<T, OutputType> extends AbstractNode<OutputType> {
141141 readonly func : ( params : T ) => OutputType ;
142142 readonly type = "function" ;
143143 constructor ( child : Node < T > , func : ( params : T ) => OutputType ) ;
144- wrapContext ( paramName : string ) : AbstractNode < ValueFn < OutputType > > ;
144+ wrapContext ( ) : AbstractNode < ValueFn < OutputType > > ;
145145 filterNodes ( exposingNodes : Record < string , Node < unknown > > ) : Map < Node < unknown > , string [ ] > ;
146146 justEval ( exposingNodes : Record < string , Node < unknown > > , methods ?: EvalMethods ) : OutputType ;
147147 getChildren ( ) : Node < unknown > [ ] ;
@@ -172,7 +172,7 @@ declare class ValueAndMsg<T> {
172172interface CodeNodeOptions {
173173 codeType ?: CodeType ;
174174 evalWithMethods ?: boolean ;
175- paramNamesList ?: string [ ] [ ] ;
175+ wrapDepth ?: number ;
176176}
177177/**
178178 * user input node
@@ -191,7 +191,7 @@ declare class CodeNode extends AbstractNode<ValueAndMsg<unknown>> {
191191 private readonly evalWithMethods ;
192192 private directDepends ;
193193 constructor ( unevaledValue : string , options ?: CodeNodeOptions | undefined ) ;
194- wrapContext ( paramName : string ) : AbstractNode < ValueFn < ValueAndMsg < unknown > > > ;
194+ wrapContext ( ) : AbstractNode < ValueFn < ValueAndMsg < unknown > > > ;
195195 private convertedValue ;
196196 filterNodes ( exposingNodes : Record < string , Node < unknown > > ) : Map < Node < unknown > , string [ ] > ;
197197 filterDirectDepends ( exposingNodes : Record < string , Node < unknown > > ) : Map < Node < unknown > , string [ ] > ;
@@ -217,7 +217,7 @@ declare class FetchCheckNode extends AbstractNode<FetchInfo> {
217217 readonly child : Node < unknown > ;
218218 readonly type = "fetchCheck" ;
219219 constructor ( child : Node < unknown > ) ;
220- wrapContext ( paramName : string ) : AbstractNode < ValueFn < FetchInfo > > ;
220+ wrapContext ( ) : AbstractNode < ValueFn < FetchInfo > > ;
221221 filterNodes ( exposingNodes : Record < string , Node < unknown > > ) : Map < Node < unknown > , string [ ] > ;
222222 justEval ( exposingNodes : Record < string , Node < unknown > > ) : FetchInfo ;
223223 getChildren ( ) : Node < unknown > [ ] ;
@@ -238,7 +238,7 @@ declare class RecordNode<T extends Record<string, Node<unknown>>> extends Abstra
238238 readonly children : T ;
239239 readonly type = "record" ;
240240 constructor ( children : T ) ;
241- wrapContext ( paramName : string ) : AbstractNode < ValueFn < RecordNodeToValue < T > > > ;
241+ wrapContext ( ) : AbstractNode < ValueFn < RecordNodeToValue < T > > > ;
242242 filterNodes ( exposingNodes : Record < string , Node < unknown > > ) : Map < Node < unknown > , string [ ] > ;
243243 justEval (
244244 exposingNodes : Record < string , Node < unknown > > ,
@@ -260,7 +260,7 @@ declare class SimpleNode<T> extends AbstractNode<T> {
260260 readonly value : T ;
261261 readonly type = "simple" ;
262262 constructor ( value : T ) ;
263- wrapContext ( paramName : string ) : SimpleNode < ( ) => T > ;
263+ wrapContext ( ) : SimpleNode < ( ) => T > ;
264264 filterNodes ( exposingNodes : Record < string , Node < unknown > > ) : Map < Node < unknown > , string [ ] > ;
265265 justEval ( exposingNodes : Record < string , Node < unknown > > ) : T ;
266266 getChildren ( ) : Node < unknown > [ ] ;
@@ -288,7 +288,7 @@ declare class WrapNode<T> extends AbstractNode<T> {
288288 moduleExposingMethods ?: EvalMethods | undefined ,
289289 inputNodes ?: Record < string , string | Node < unknown > > | undefined
290290 ) ;
291- wrapContext ( paramName : string ) : AbstractNode < ValueFn < T > > ;
291+ wrapContext ( ) : AbstractNode < ValueFn < T > > ;
292292 private wrap ;
293293 filterNodes ( exposingNodes : Record < string , Node < unknown > > ) : Map < Node < unknown > , string [ ] > ;
294294 justEval ( exposingNodes : Record < string , Node < unknown > > , methods : EvalMethods ) : T ;
@@ -305,7 +305,7 @@ declare class WrapContextNodeV2<T> extends AbstractNode<T> {
305305 readonly paramNodes : Record < string , Node < unknown > > ;
306306 readonly type = "wrapContextV2" ;
307307 constructor ( child : Node < T > , paramNodes : Record < string , Node < unknown > > ) ;
308- wrapContext ( paramName : string ) : AbstractNode < ValueFn < T > > ;
308+ wrapContext ( ) : AbstractNode < ValueFn < T > > ;
309309 filterNodes ( exposingNodes : Record < string , Node < unknown > > ) : Map < Node < unknown > , string [ ] > ;
310310 justEval ( exposingNodes : Record < string , Node < unknown > > , methods ?: EvalMethods ) : T ;
311311 getChildren ( ) : Node < unknown > [ ] ;
0 commit comments