@@ -4,7 +4,7 @@ declare type EvalMethods = Record<string, Record<string, Function>>;
4
4
declare type CodeType = undefined | "JSON" | "Function" ;
5
5
6
6
declare 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 ;
8
8
declare type NodeToNodeFn < NodeT > = Node < ValueFn < NodeToValue < NodeT > > > ;
9
9
declare type FetchInfo = {
10
10
/**
@@ -34,9 +34,9 @@ declare type RecordOptionalNodeToValue<T> = {
34
34
interface Node < T > {
35
35
readonly type : string ;
36
36
/**
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"
38
38
*/
39
- wrapContext ( paramName : string ) : Node < ValueFn < T > > ;
39
+ wrapContext ( ) : Node < ValueFn < T > > ;
40
40
/**
41
41
* calculate evaluate result
42
42
* @param exposingNodes other dependent Nodes
@@ -67,7 +67,7 @@ declare abstract class AbstractNode<T> implements Node<T> {
67
67
readonly type : string ;
68
68
evalCache : EvalCache < T > ;
69
69
constructor ( ) ;
70
- abstract wrapContext ( paramName : string ) : AbstractNode < ValueFn < T > > ;
70
+ abstract wrapContext ( ) : AbstractNode < ValueFn < T > > ;
71
71
evaluate ( exposingNodes ?: Record < string , Node < unknown > > , methods ?: EvalMethods ) : T ;
72
72
hasCycle ( ) : boolean ;
73
73
abstract getChildren ( ) : Node < unknown > [ ] ;
@@ -111,7 +111,7 @@ declare class CachedNode<T> extends AbstractNode<CachedValue<T>> {
111
111
type : string ;
112
112
child : AbstractNode < T > ;
113
113
constructor ( child : AbstractNode < T > ) ;
114
- wrapContext ( paramName : string ) : AbstractNode < ValueFn < CachedValue < T > > > ;
114
+ wrapContext ( ) : AbstractNode < ValueFn < CachedValue < T > > > ;
115
115
filterNodes ( exposingNodes : Record < string , Node < unknown > > ) : Map < Node < unknown > , string [ ] > ;
116
116
justEval ( exposingNodes : Record < string , Node < unknown > > , methods ?: EvalMethods ) : CachedValue < T > ;
117
117
getChildren ( ) : Node < unknown > [ ] ;
@@ -141,7 +141,7 @@ declare class FunctionNode<T, OutputType> extends AbstractNode<OutputType> {
141
141
readonly func : ( params : T ) => OutputType ;
142
142
readonly type = "function" ;
143
143
constructor ( child : Node < T > , func : ( params : T ) => OutputType ) ;
144
- wrapContext ( paramName : string ) : AbstractNode < ValueFn < OutputType > > ;
144
+ wrapContext ( ) : AbstractNode < ValueFn < OutputType > > ;
145
145
filterNodes ( exposingNodes : Record < string , Node < unknown > > ) : Map < Node < unknown > , string [ ] > ;
146
146
justEval ( exposingNodes : Record < string , Node < unknown > > , methods ?: EvalMethods ) : OutputType ;
147
147
getChildren ( ) : Node < unknown > [ ] ;
@@ -172,7 +172,7 @@ declare class ValueAndMsg<T> {
172
172
interface CodeNodeOptions {
173
173
codeType ?: CodeType ;
174
174
evalWithMethods ?: boolean ;
175
- paramNamesList ?: string [ ] [ ] ;
175
+ wrapDepth ?: number ;
176
176
}
177
177
/**
178
178
* user input node
@@ -191,7 +191,7 @@ declare class CodeNode extends AbstractNode<ValueAndMsg<unknown>> {
191
191
private readonly evalWithMethods ;
192
192
private directDepends ;
193
193
constructor ( unevaledValue : string , options ?: CodeNodeOptions | undefined ) ;
194
- wrapContext ( paramName : string ) : AbstractNode < ValueFn < ValueAndMsg < unknown > > > ;
194
+ wrapContext ( ) : AbstractNode < ValueFn < ValueAndMsg < unknown > > > ;
195
195
private convertedValue ;
196
196
filterNodes ( exposingNodes : Record < string , Node < unknown > > ) : Map < Node < unknown > , string [ ] > ;
197
197
filterDirectDepends ( exposingNodes : Record < string , Node < unknown > > ) : Map < Node < unknown > , string [ ] > ;
@@ -217,7 +217,7 @@ declare class FetchCheckNode extends AbstractNode<FetchInfo> {
217
217
readonly child : Node < unknown > ;
218
218
readonly type = "fetchCheck" ;
219
219
constructor ( child : Node < unknown > ) ;
220
- wrapContext ( paramName : string ) : AbstractNode < ValueFn < FetchInfo > > ;
220
+ wrapContext ( ) : AbstractNode < ValueFn < FetchInfo > > ;
221
221
filterNodes ( exposingNodes : Record < string , Node < unknown > > ) : Map < Node < unknown > , string [ ] > ;
222
222
justEval ( exposingNodes : Record < string , Node < unknown > > ) : FetchInfo ;
223
223
getChildren ( ) : Node < unknown > [ ] ;
@@ -238,7 +238,7 @@ declare class RecordNode<T extends Record<string, Node<unknown>>> extends Abstra
238
238
readonly children : T ;
239
239
readonly type = "record" ;
240
240
constructor ( children : T ) ;
241
- wrapContext ( paramName : string ) : AbstractNode < ValueFn < RecordNodeToValue < T > > > ;
241
+ wrapContext ( ) : AbstractNode < ValueFn < RecordNodeToValue < T > > > ;
242
242
filterNodes ( exposingNodes : Record < string , Node < unknown > > ) : Map < Node < unknown > , string [ ] > ;
243
243
justEval (
244
244
exposingNodes : Record < string , Node < unknown > > ,
@@ -260,7 +260,7 @@ declare class SimpleNode<T> extends AbstractNode<T> {
260
260
readonly value : T ;
261
261
readonly type = "simple" ;
262
262
constructor ( value : T ) ;
263
- wrapContext ( paramName : string ) : SimpleNode < ( ) => T > ;
263
+ wrapContext ( ) : SimpleNode < ( ) => T > ;
264
264
filterNodes ( exposingNodes : Record < string , Node < unknown > > ) : Map < Node < unknown > , string [ ] > ;
265
265
justEval ( exposingNodes : Record < string , Node < unknown > > ) : T ;
266
266
getChildren ( ) : Node < unknown > [ ] ;
@@ -288,7 +288,7 @@ declare class WrapNode<T> extends AbstractNode<T> {
288
288
moduleExposingMethods ?: EvalMethods | undefined ,
289
289
inputNodes ?: Record < string , string | Node < unknown > > | undefined
290
290
) ;
291
- wrapContext ( paramName : string ) : AbstractNode < ValueFn < T > > ;
291
+ wrapContext ( ) : AbstractNode < ValueFn < T > > ;
292
292
private wrap ;
293
293
filterNodes ( exposingNodes : Record < string , Node < unknown > > ) : Map < Node < unknown > , string [ ] > ;
294
294
justEval ( exposingNodes : Record < string , Node < unknown > > , methods : EvalMethods ) : T ;
@@ -305,7 +305,7 @@ declare class WrapContextNodeV2<T> extends AbstractNode<T> {
305
305
readonly paramNodes : Record < string , Node < unknown > > ;
306
306
readonly type = "wrapContextV2" ;
307
307
constructor ( child : Node < T > , paramNodes : Record < string , Node < unknown > > ) ;
308
- wrapContext ( paramName : string ) : AbstractNode < ValueFn < T > > ;
308
+ wrapContext ( ) : AbstractNode < ValueFn < T > > ;
309
309
filterNodes ( exposingNodes : Record < string , Node < unknown > > ) : Map < Node < unknown > , string [ ] > ;
310
310
justEval ( exposingNodes : Record < string , Node < unknown > > , methods ?: EvalMethods ) : T ;
311
311
getChildren ( ) : Node < unknown > [ ] ;
0 commit comments