@danielsimonjr/mathts-expression 0.8.0 → 0.8.2

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.
Files changed (52) hide show
  1. package/README.md +42 -42
  2. package/dist/index.js +276 -347
  3. package/dist/node/AccessorNode.d.ts +121 -132
  4. package/dist/node/AccessorNode.d.ts.map +1 -1
  5. package/dist/node/ArrayNode.d.ts +25 -30
  6. package/dist/node/ArrayNode.d.ts.map +1 -1
  7. package/dist/node/AssignmentNode.d.ts +19 -32
  8. package/dist/node/AssignmentNode.d.ts.map +1 -1
  9. package/dist/node/BlockNode.d.ts +121 -126
  10. package/dist/node/BlockNode.d.ts.map +1 -1
  11. package/dist/node/ConditionalNode.d.ts +25 -30
  12. package/dist/node/ConditionalNode.d.ts.map +1 -1
  13. package/dist/node/ConstantNode.d.ts +93 -100
  14. package/dist/node/ConstantNode.d.ts.map +1 -1
  15. package/dist/node/FunctionAssignmentNode.d.ts +93 -98
  16. package/dist/node/FunctionAssignmentNode.d.ts.map +1 -1
  17. package/dist/node/FunctionNode.d.ts +32 -43
  18. package/dist/node/FunctionNode.d.ts.map +1 -1
  19. package/dist/node/IndexNode.d.ts +949 -72
  20. package/dist/node/IndexNode.d.ts.map +1 -1
  21. package/dist/node/Node.d.ts +43 -39
  22. package/dist/node/Node.d.ts.map +1 -1
  23. package/dist/node/ObjectNode.d.ts +947 -56
  24. package/dist/node/ObjectNode.d.ts.map +1 -1
  25. package/dist/node/OperatorNode.d.ts +955 -79
  26. package/dist/node/OperatorNode.d.ts.map +1 -1
  27. package/dist/node/ParenthesisNode.d.ts +881 -63
  28. package/dist/node/ParenthesisNode.d.ts.map +1 -1
  29. package/dist/node/RangeNode.d.ts +955 -71
  30. package/dist/node/RangeNode.d.ts.map +1 -1
  31. package/dist/node/RelationalNode.d.ts +947 -61
  32. package/dist/node/RelationalNode.d.ts.map +1 -1
  33. package/dist/node/SymbolNode.d.ts +942 -43
  34. package/dist/node/SymbolNode.d.ts.map +1 -1
  35. package/dist/node/utils/access.d.ts +8 -1
  36. package/dist/node/utils/access.d.ts.map +1 -1
  37. package/dist/node/utils/assign.d.ts +9 -1
  38. package/dist/node/utils/assign.d.ts.map +1 -1
  39. package/dist/node/utils/stringSubset.d.ts +8 -8
  40. package/dist/operators.d.ts +12 -15
  41. package/dist/operators.d.ts.map +1 -1
  42. package/dist/parse.d.ts +2 -0
  43. package/dist/parse.d.ts.map +1 -1
  44. package/dist/transform/utils/dimToZeroBase.d.ts +4 -0
  45. package/dist/transform/utils/dimToZeroBase.d.ts.map +1 -1
  46. package/dist/types.d.ts +8 -0
  47. package/dist/types.d.ts.map +1 -1
  48. package/dist/utils/is.d.ts +275 -3
  49. package/dist/utils/is.d.ts.map +1 -1
  50. package/dist/utils/latex.d.ts +12 -0
  51. package/dist/utils/latex.d.ts.map +1 -1
  52. package/package.json +59 -59
@@ -1,157 +1,1048 @@
1
- interface Node {
2
- _compile: (math: Record<string, unknown>, argNames: Record<string, boolean>) => CompileFunction;
3
- _ifNode: (node: unknown) => Node;
4
- toString: (options?: StringOptions) => string;
5
- toHTML: (options?: StringOptions) => string;
6
- toTex: (options?: StringOptions) => string;
7
- }
1
+ import type { MathNode } from './Node.js';
8
2
  type CompileFunction = (scope: Map<string, unknown>, args: Record<string, unknown>, context: unknown) => unknown;
9
3
  interface StringOptions {
10
4
  [key: string]: unknown;
11
5
  }
12
6
  interface Dependencies {
13
- Node: new (...args: unknown[]) => Node;
7
+ Node: new (...args: unknown[]) => MathNode;
14
8
  }
15
9
  export declare const createObjectNode: import("../utils/factory.js").FactoryFunction<Dependencies, {
16
- new (properties?: Record<string, Node>): {
17
- properties: Record<string, Node>;
10
+ new (properties?: Record<string, MathNode>): {
11
+ get isNode(): boolean;
12
+ evaluate(scope?: Record<string, unknown>): unknown;
13
+ compile(): import("./Node.js").CompiledExpression;
14
+ _ifNode(node: unknown): {
15
+ get type(): string;
16
+ get isNode(): boolean;
17
+ evaluate(scope?: Record<string, unknown>): unknown;
18
+ compile(): import("./Node.js").CompiledExpression;
19
+ _compile(_math: Record<string, unknown>, _argNames: Record<string, boolean>): (scope: Map<string, unknown>, args: Record<string, unknown>, context: unknown) => unknown;
20
+ forEach(_callback: (child: /*elided*/ any, path: string, parent: /*elided*/ any) => void): void;
21
+ map(_callback: (child: /*elided*/ any, path: string, parent: /*elided*/ any) => /*elided*/ any): /*elided*/ any;
22
+ _ifNode(node: unknown): /*elided*/ any;
23
+ traverse(callback: (node: /*elided*/ any, path: string | null, parent: /*elided*/ any | null) => void): void;
24
+ transform(callback: (node: /*elided*/ any, path: string | null, parent: /*elided*/ any | null) => /*elided*/ any): /*elided*/ any;
25
+ filter(callback: (node: /*elided*/ any, path: string | null, parent: /*elided*/ any | null) => boolean): /*elided*/ any[];
26
+ clone(): /*elided*/ any;
27
+ cloneDeep(): /*elided*/ any;
28
+ equals(other: /*elided*/ any | null | undefined): boolean;
29
+ toString(options?: import("./Node.js").StringOptions): string;
30
+ _toString(_options?: import("./Node.js").StringOptions): string;
31
+ toJSON(): Record<string, unknown>;
32
+ toHTML(options?: import("./Node.js").StringOptions): string;
33
+ _toHTML(_options?: import("./Node.js").StringOptions): string;
34
+ toTex(options?: import("./Node.js").StringOptions): string;
35
+ toMarkdown(options?: {
36
+ inline?: boolean;
37
+ } & import("./Node.js").StringOptions): string;
38
+ toDOT(options?: {
39
+ name?: string;
40
+ }): string;
41
+ toMathML(): string;
42
+ _toMathML(): string;
43
+ _toTex(_options?: import("./Node.js").StringOptions): string;
44
+ _getCustomString(options?: import("./Node.js").StringOptions): string | undefined;
45
+ getIdentifier(): string;
46
+ getContent(): /*elided*/ any;
47
+ };
48
+ traverse(callback: (node: {
49
+ get type(): string;
50
+ get isNode(): boolean;
51
+ evaluate(scope?: Record<string, unknown>): unknown;
52
+ compile(): import("./Node.js").CompiledExpression;
53
+ _compile(_math: Record<string, unknown>, _argNames: Record<string, boolean>): (scope: Map<string, unknown>, args: Record<string, unknown>, context: unknown) => unknown;
54
+ forEach(_callback: (child: any, path: string, parent: any) => void): void;
55
+ map(_callback: (child: any, path: string, parent: any) => any): any;
56
+ _ifNode(node: unknown): any;
57
+ traverse(callback: (node: any, path: string | null, parent: any | null) => void): void;
58
+ transform(callback: (node: any, path: string | null, parent: any | null) => any): any;
59
+ filter(callback: (node: any, path: string | null, parent: any | null) => boolean): any[];
60
+ clone(): any;
61
+ cloneDeep(): any;
62
+ equals(other: any | null | undefined): boolean;
63
+ toString(options?: import("./Node.js").StringOptions): string;
64
+ _toString(_options?: import("./Node.js").StringOptions): string;
65
+ toJSON(): Record<string, unknown>;
66
+ toHTML(options?: import("./Node.js").StringOptions): string;
67
+ _toHTML(_options?: import("./Node.js").StringOptions): string;
68
+ toTex(options?: import("./Node.js").StringOptions): string;
69
+ toMarkdown(options?: {
70
+ inline?: boolean;
71
+ } & import("./Node.js").StringOptions): string;
72
+ toDOT(options?: {
73
+ name?: string;
74
+ }): string;
75
+ toMathML(): string;
76
+ _toMathML(): string;
77
+ _toTex(_options?: import("./Node.js").StringOptions): string;
78
+ _getCustomString(options?: import("./Node.js").StringOptions): string | undefined;
79
+ getIdentifier(): string;
80
+ getContent(): any;
81
+ }, path: string | null, parent: {
82
+ get type(): string;
83
+ get isNode(): boolean;
84
+ evaluate(scope?: Record<string, unknown>): unknown;
85
+ compile(): import("./Node.js").CompiledExpression;
86
+ _compile(_math: Record<string, unknown>, _argNames: Record<string, boolean>): (scope: Map<string, unknown>, args: Record<string, unknown>, context: unknown) => unknown;
87
+ forEach(_callback: (child: any, path: string, parent: any) => void): void;
88
+ map(_callback: (child: any, path: string, parent: any) => any): any;
89
+ _ifNode(node: unknown): any;
90
+ traverse(callback: (node: any, path: string | null, parent: any | null) => void): void;
91
+ transform(callback: (node: any, path: string | null, parent: any | null) => any): any;
92
+ filter(callback: (node: any, path: string | null, parent: any | null) => boolean): any[];
93
+ clone(): any;
94
+ cloneDeep(): any;
95
+ equals(other: any | null | undefined): boolean;
96
+ toString(options?: import("./Node.js").StringOptions): string;
97
+ _toString(_options?: import("./Node.js").StringOptions): string;
98
+ toJSON(): Record<string, unknown>;
99
+ toHTML(options?: import("./Node.js").StringOptions): string;
100
+ _toHTML(_options?: import("./Node.js").StringOptions): string;
101
+ toTex(options?: import("./Node.js").StringOptions): string;
102
+ toMarkdown(options?: {
103
+ inline?: boolean;
104
+ } & import("./Node.js").StringOptions): string;
105
+ toDOT(options?: {
106
+ name?: string;
107
+ }): string;
108
+ toMathML(): string;
109
+ _toMathML(): string;
110
+ _toTex(_options?: import("./Node.js").StringOptions): string;
111
+ _getCustomString(options?: import("./Node.js").StringOptions): string | undefined;
112
+ getIdentifier(): string;
113
+ getContent(): any;
114
+ } | null) => void): void;
115
+ properties: Record<string, MathNode>;
18
116
  get type(): string;
19
117
  get isObjectNode(): boolean;
20
118
  /**
21
119
  * Compile a node into a JavaScript function.
22
120
  * This basically pre-calculates as much as possible and only leaves open
23
121
  * calculations which depend on a dynamic scope with variables.
24
- * @param {Object} math Math.js namespace with functions and constants.
25
- * @param {Object} argNames An object with argument names as key and `true`
122
+ * @param math - Math.js namespace with functions and constants.
123
+ * @param argNames - An object with argument names as key and `true`
26
124
  * as value. Used in the SymbolNode to optimize
27
125
  * for arguments from user assigned functions
28
126
  * (see FunctionAssignmentNode) or special symbols
29
127
  * like `end` (see IndexNode).
30
- * @return {function} Returns a function which can be called like:
128
+ * @returns Returns a function which can be called like:
31
129
  * evalNode(scope: Object, args: Object, context: *)
32
130
  */
33
131
  _compile(math: Record<string, unknown>, argNames: Record<string, boolean>): CompileFunction;
34
132
  /**
35
133
  * Execute a callback for each of the child nodes of this node
36
- * @param {function(child: Node, path: string, parent: Node)} callback
134
+ * @param callback
37
135
  */
38
- forEach(callback: (child: Node, path: string, parent: /*elided*/ any) => void): void;
136
+ forEach(callback: (child: MathNode, path: string, parent: /*elided*/ any) => void): void;
39
137
  /**
40
138
  * Create a new ObjectNode whose children are the results of calling
41
139
  * the provided callback function for each child of the original node.
42
- * @param {function(child: Node, path: string, parent: Node): Node} callback
43
- * @returns {ObjectNode} Returns a transformed copy of the node
140
+ * @param callback
141
+ * @returns Returns a transformed copy of the node
44
142
  */
45
- map(callback: (child: Node, path: string, parent: /*elided*/ any) => Node): /*elided*/ any;
143
+ map(callback: (child: MathNode, path: string, parent: /*elided*/ any) => MathNode): /*elided*/ any;
46
144
  /**
47
145
  * Create a clone of this node, a shallow copy
48
- * @return {ObjectNode}
49
146
  */
50
147
  clone(): /*elided*/ any;
51
148
  /**
52
149
  * Get string representation
53
- * @param {Object} options
54
- * @return {string} str
150
+ * @param options
151
+ * @returns str
55
152
  * @override
56
153
  */
57
154
  _toString(options?: StringOptions): string;
58
155
  /**
59
156
  * Get a JSON representation of the node
60
- * @returns {Object}
61
157
  */
62
- toJSON(): Record<string, unknown>;
158
+ toJSON(): {
159
+ mathjs: string;
160
+ properties: Record<string, MathNode>;
161
+ };
63
162
  /**
64
163
  * Get HTML representation
65
- * @param {Object} options
66
- * @return {string} str
164
+ * @param options
165
+ * @returns str
67
166
  * @override
68
167
  */
69
168
  _toHTML(options?: StringOptions): string;
70
169
  /**
71
170
  * Get LaTeX representation
72
- * @param {Object} options
73
- * @return {string} str
171
+ * @param options
172
+ * @returns str
74
173
  */
75
174
  _toTex(options?: StringOptions): string;
76
- _ifNode: (node: unknown) => Node;
77
- toString: (options?: StringOptions) => string;
78
- toHTML: (options?: StringOptions) => string;
79
- toTex: (options?: StringOptions) => string;
175
+ transform(callback: (node: {
176
+ get type(): string;
177
+ get isNode(): boolean;
178
+ evaluate(scope?: Record<string, unknown>): unknown;
179
+ compile(): import("./Node.js").CompiledExpression;
180
+ _compile(_math: Record<string, unknown>, _argNames: Record<string, boolean>): (scope: Map<string, unknown>, args: Record<string, unknown>, context: unknown) => unknown;
181
+ forEach(_callback: (child: any, path: string, parent: any) => void): void;
182
+ map(_callback: (child: any, path: string, parent: any) => any): any;
183
+ _ifNode(node: unknown): any;
184
+ traverse(callback: (node: any, path: string | null, parent: any | null) => void): void;
185
+ transform(callback: (node: any, path: string | null, parent: any | null) => any): any;
186
+ filter(callback: (node: any, path: string | null, parent: any | null) => boolean): any[];
187
+ clone(): any;
188
+ cloneDeep(): any;
189
+ equals(other: any | null | undefined): boolean;
190
+ toString(options?: import("./Node.js").StringOptions): string;
191
+ _toString(_options?: import("./Node.js").StringOptions): string;
192
+ toJSON(): Record<string, unknown>;
193
+ toHTML(options?: import("./Node.js").StringOptions): string;
194
+ _toHTML(_options?: import("./Node.js").StringOptions): string;
195
+ toTex(options?: import("./Node.js").StringOptions): string;
196
+ toMarkdown(options?: {
197
+ inline?: boolean;
198
+ } & import("./Node.js").StringOptions): string;
199
+ toDOT(options?: {
200
+ name?: string;
201
+ }): string;
202
+ toMathML(): string;
203
+ _toMathML(): string;
204
+ _toTex(_options?: import("./Node.js").StringOptions): string;
205
+ _getCustomString(options?: import("./Node.js").StringOptions): string | undefined;
206
+ getIdentifier(): string;
207
+ getContent(): any;
208
+ }, path: string | null, parent: {
209
+ get type(): string;
210
+ get isNode(): boolean;
211
+ evaluate(scope?: Record<string, unknown>): unknown;
212
+ compile(): import("./Node.js").CompiledExpression;
213
+ _compile(_math: Record<string, unknown>, _argNames: Record<string, boolean>): (scope: Map<string, unknown>, args: Record<string, unknown>, context: unknown) => unknown;
214
+ forEach(_callback: (child: any, path: string, parent: any) => void): void;
215
+ map(_callback: (child: any, path: string, parent: any) => any): any;
216
+ _ifNode(node: unknown): any;
217
+ traverse(callback: (node: any, path: string | null, parent: any | null) => void): void;
218
+ transform(callback: (node: any, path: string | null, parent: any | null) => any): any;
219
+ filter(callback: (node: any, path: string | null, parent: any | null) => boolean): any[];
220
+ clone(): any;
221
+ cloneDeep(): any;
222
+ equals(other: any | null | undefined): boolean;
223
+ toString(options?: import("./Node.js").StringOptions): string;
224
+ _toString(_options?: import("./Node.js").StringOptions): string;
225
+ toJSON(): Record<string, unknown>;
226
+ toHTML(options?: import("./Node.js").StringOptions): string;
227
+ _toHTML(_options?: import("./Node.js").StringOptions): string;
228
+ toTex(options?: import("./Node.js").StringOptions): string;
229
+ toMarkdown(options?: {
230
+ inline?: boolean;
231
+ } & import("./Node.js").StringOptions): string;
232
+ toDOT(options?: {
233
+ name?: string;
234
+ }): string;
235
+ toMathML(): string;
236
+ _toMathML(): string;
237
+ _toTex(_options?: import("./Node.js").StringOptions): string;
238
+ _getCustomString(options?: import("./Node.js").StringOptions): string | undefined;
239
+ getIdentifier(): string;
240
+ getContent(): any;
241
+ } | null) => {
242
+ get type(): string;
243
+ get isNode(): boolean;
244
+ evaluate(scope?: Record<string, unknown>): unknown;
245
+ compile(): import("./Node.js").CompiledExpression;
246
+ _compile(_math: Record<string, unknown>, _argNames: Record<string, boolean>): (scope: Map<string, unknown>, args: Record<string, unknown>, context: unknown) => unknown;
247
+ forEach(_callback: (child: any, path: string, parent: any) => void): void;
248
+ map(_callback: (child: any, path: string, parent: any) => any): any;
249
+ _ifNode(node: unknown): any;
250
+ traverse(callback: (node: any, path: string | null, parent: any | null) => void): void;
251
+ transform(callback: (node: any, path: string | null, parent: any | null) => any): any;
252
+ filter(callback: (node: any, path: string | null, parent: any | null) => boolean): any[];
253
+ clone(): any;
254
+ cloneDeep(): any;
255
+ equals(other: any | null | undefined): boolean;
256
+ toString(options?: import("./Node.js").StringOptions): string;
257
+ _toString(_options?: import("./Node.js").StringOptions): string;
258
+ toJSON(): Record<string, unknown>;
259
+ toHTML(options?: import("./Node.js").StringOptions): string;
260
+ _toHTML(_options?: import("./Node.js").StringOptions): string;
261
+ toTex(options?: import("./Node.js").StringOptions): string;
262
+ toMarkdown(options?: {
263
+ inline?: boolean;
264
+ } & import("./Node.js").StringOptions): string;
265
+ toDOT(options?: {
266
+ name?: string;
267
+ }): string;
268
+ toMathML(): string;
269
+ _toMathML(): string;
270
+ _toTex(_options?: import("./Node.js").StringOptions): string;
271
+ _getCustomString(options?: import("./Node.js").StringOptions): string | undefined;
272
+ getIdentifier(): string;
273
+ getContent(): any;
274
+ }): {
275
+ get type(): string;
276
+ get isNode(): boolean;
277
+ evaluate(scope?: Record<string, unknown>): unknown;
278
+ compile(): import("./Node.js").CompiledExpression;
279
+ _compile(_math: Record<string, unknown>, _argNames: Record<string, boolean>): (scope: Map<string, unknown>, args: Record<string, unknown>, context: unknown) => unknown;
280
+ forEach(_callback: (child: any, path: string, parent: any) => void): void;
281
+ map(_callback: (child: any, path: string, parent: any) => any): any;
282
+ _ifNode(node: unknown): any;
283
+ traverse(callback: (node: any, path: string | null, parent: any | null) => void): void;
284
+ transform(callback: (node: any, path: string | null, parent: any | null) => any): any;
285
+ filter(callback: (node: any, path: string | null, parent: any | null) => boolean): any[];
286
+ clone(): any;
287
+ cloneDeep(): any;
288
+ equals(other: any | null | undefined): boolean;
289
+ toString(options?: import("./Node.js").StringOptions): string;
290
+ _toString(_options?: import("./Node.js").StringOptions): string;
291
+ toJSON(): Record<string, unknown>;
292
+ toHTML(options?: import("./Node.js").StringOptions): string;
293
+ _toHTML(_options?: import("./Node.js").StringOptions): string;
294
+ toTex(options?: import("./Node.js").StringOptions): string;
295
+ toMarkdown(options?: {
296
+ inline?: boolean;
297
+ } & import("./Node.js").StringOptions): string;
298
+ toDOT(options?: {
299
+ name?: string;
300
+ }): string;
301
+ toMathML(): string;
302
+ _toMathML(): string;
303
+ _toTex(_options?: import("./Node.js").StringOptions): string;
304
+ _getCustomString(options?: import("./Node.js").StringOptions): string | undefined;
305
+ getIdentifier(): string;
306
+ getContent(): any;
307
+ };
308
+ filter(callback: (node: {
309
+ get type(): string;
310
+ get isNode(): boolean;
311
+ evaluate(scope?: Record<string, unknown>): unknown;
312
+ compile(): import("./Node.js").CompiledExpression;
313
+ _compile(_math: Record<string, unknown>, _argNames: Record<string, boolean>): (scope: Map<string, unknown>, args: Record<string, unknown>, context: unknown) => unknown;
314
+ forEach(_callback: (child: any, path: string, parent: any) => void): void;
315
+ map(_callback: (child: any, path: string, parent: any) => any): any;
316
+ _ifNode(node: unknown): any;
317
+ traverse(callback: (node: any, path: string | null, parent: any | null) => void): void;
318
+ transform(callback: (node: any, path: string | null, parent: any | null) => any): any;
319
+ filter(callback: (node: any, path: string | null, parent: any | null) => boolean): any[];
320
+ clone(): any;
321
+ cloneDeep(): any;
322
+ equals(other: any | null | undefined): boolean;
323
+ toString(options?: import("./Node.js").StringOptions): string;
324
+ _toString(_options?: import("./Node.js").StringOptions): string;
325
+ toJSON(): Record<string, unknown>;
326
+ toHTML(options?: import("./Node.js").StringOptions): string;
327
+ _toHTML(_options?: import("./Node.js").StringOptions): string;
328
+ toTex(options?: import("./Node.js").StringOptions): string;
329
+ toMarkdown(options?: {
330
+ inline?: boolean;
331
+ } & import("./Node.js").StringOptions): string;
332
+ toDOT(options?: {
333
+ name?: string;
334
+ }): string;
335
+ toMathML(): string;
336
+ _toMathML(): string;
337
+ _toTex(_options?: import("./Node.js").StringOptions): string;
338
+ _getCustomString(options?: import("./Node.js").StringOptions): string | undefined;
339
+ getIdentifier(): string;
340
+ getContent(): any;
341
+ }, path: string | null, parent: {
342
+ get type(): string;
343
+ get isNode(): boolean;
344
+ evaluate(scope?: Record<string, unknown>): unknown;
345
+ compile(): import("./Node.js").CompiledExpression;
346
+ _compile(_math: Record<string, unknown>, _argNames: Record<string, boolean>): (scope: Map<string, unknown>, args: Record<string, unknown>, context: unknown) => unknown;
347
+ forEach(_callback: (child: any, path: string, parent: any) => void): void;
348
+ map(_callback: (child: any, path: string, parent: any) => any): any;
349
+ _ifNode(node: unknown): any;
350
+ traverse(callback: (node: any, path: string | null, parent: any | null) => void): void;
351
+ transform(callback: (node: any, path: string | null, parent: any | null) => any): any;
352
+ filter(callback: (node: any, path: string | null, parent: any | null) => boolean): any[];
353
+ clone(): any;
354
+ cloneDeep(): any;
355
+ equals(other: any | null | undefined): boolean;
356
+ toString(options?: import("./Node.js").StringOptions): string;
357
+ _toString(_options?: import("./Node.js").StringOptions): string;
358
+ toJSON(): Record<string, unknown>;
359
+ toHTML(options?: import("./Node.js").StringOptions): string;
360
+ _toHTML(_options?: import("./Node.js").StringOptions): string;
361
+ toTex(options?: import("./Node.js").StringOptions): string;
362
+ toMarkdown(options?: {
363
+ inline?: boolean;
364
+ } & import("./Node.js").StringOptions): string;
365
+ toDOT(options?: {
366
+ name?: string;
367
+ }): string;
368
+ toMathML(): string;
369
+ _toMathML(): string;
370
+ _toTex(_options?: import("./Node.js").StringOptions): string;
371
+ _getCustomString(options?: import("./Node.js").StringOptions): string | undefined;
372
+ getIdentifier(): string;
373
+ getContent(): any;
374
+ } | null) => boolean): {
375
+ get type(): string;
376
+ get isNode(): boolean;
377
+ evaluate(scope?: Record<string, unknown>): unknown;
378
+ compile(): import("./Node.js").CompiledExpression;
379
+ _compile(_math: Record<string, unknown>, _argNames: Record<string, boolean>): (scope: Map<string, unknown>, args: Record<string, unknown>, context: unknown) => unknown;
380
+ forEach(_callback: (child: any, path: string, parent: any) => void): void;
381
+ map(_callback: (child: any, path: string, parent: any) => any): any;
382
+ _ifNode(node: unknown): any;
383
+ traverse(callback: (node: any, path: string | null, parent: any | null) => void): void;
384
+ transform(callback: (node: any, path: string | null, parent: any | null) => any): any;
385
+ filter(callback: (node: any, path: string | null, parent: any | null) => boolean): any[];
386
+ clone(): any;
387
+ cloneDeep(): any;
388
+ equals(other: any | null | undefined): boolean;
389
+ toString(options?: import("./Node.js").StringOptions): string;
390
+ _toString(_options?: import("./Node.js").StringOptions): string;
391
+ toJSON(): Record<string, unknown>;
392
+ toHTML(options?: import("./Node.js").StringOptions): string;
393
+ _toHTML(_options?: import("./Node.js").StringOptions): string;
394
+ toTex(options?: import("./Node.js").StringOptions): string;
395
+ toMarkdown(options?: {
396
+ inline?: boolean;
397
+ } & import("./Node.js").StringOptions): string;
398
+ toDOT(options?: {
399
+ name?: string;
400
+ }): string;
401
+ toMathML(): string;
402
+ _toMathML(): string;
403
+ _toTex(_options?: import("./Node.js").StringOptions): string;
404
+ _getCustomString(options?: import("./Node.js").StringOptions): string | undefined;
405
+ getIdentifier(): string;
406
+ getContent(): any;
407
+ }[];
408
+ cloneDeep(): {
409
+ get type(): string;
410
+ get isNode(): boolean;
411
+ evaluate(scope?: Record<string, unknown>): unknown;
412
+ compile(): import("./Node.js").CompiledExpression;
413
+ _compile(_math: Record<string, unknown>, _argNames: Record<string, boolean>): (scope: Map<string, unknown>, args: Record<string, unknown>, context: unknown) => unknown;
414
+ forEach(_callback: (child: any, path: string, parent: any) => void): void;
415
+ map(_callback: (child: any, path: string, parent: any) => any): any;
416
+ _ifNode(node: unknown): any;
417
+ traverse(callback: (node: any, path: string | null, parent: any | null) => void): void;
418
+ transform(callback: (node: any, path: string | null, parent: any | null) => any): any;
419
+ filter(callback: (node: any, path: string | null, parent: any | null) => boolean): any[];
420
+ clone(): any;
421
+ cloneDeep(): any;
422
+ equals(other: any | null | undefined): boolean;
423
+ toString(options?: import("./Node.js").StringOptions): string;
424
+ _toString(_options?: import("./Node.js").StringOptions): string;
425
+ toJSON(): Record<string, unknown>;
426
+ toHTML(options?: import("./Node.js").StringOptions): string;
427
+ _toHTML(_options?: import("./Node.js").StringOptions): string;
428
+ toTex(options?: import("./Node.js").StringOptions): string;
429
+ toMarkdown(options?: {
430
+ inline?: boolean;
431
+ } & import("./Node.js").StringOptions): string;
432
+ toDOT(options?: {
433
+ name?: string;
434
+ }): string;
435
+ toMathML(): string;
436
+ _toMathML(): string;
437
+ _toTex(_options?: import("./Node.js").StringOptions): string;
438
+ _getCustomString(options?: import("./Node.js").StringOptions): string | undefined;
439
+ getIdentifier(): string;
440
+ getContent(): any;
441
+ };
442
+ equals(other: {
443
+ get type(): string;
444
+ get isNode(): boolean;
445
+ evaluate(scope?: Record<string, unknown>): unknown;
446
+ compile(): import("./Node.js").CompiledExpression;
447
+ _compile(_math: Record<string, unknown>, _argNames: Record<string, boolean>): (scope: Map<string, unknown>, args: Record<string, unknown>, context: unknown) => unknown;
448
+ forEach(_callback: (child: any, path: string, parent: any) => void): void;
449
+ map(_callback: (child: any, path: string, parent: any) => any): any;
450
+ _ifNode(node: unknown): any;
451
+ traverse(callback: (node: any, path: string | null, parent: any | null) => void): void;
452
+ transform(callback: (node: any, path: string | null, parent: any | null) => any): any;
453
+ filter(callback: (node: any, path: string | null, parent: any | null) => boolean): any[];
454
+ clone(): any;
455
+ cloneDeep(): any;
456
+ equals(other: any | null | undefined): boolean;
457
+ toString(options?: import("./Node.js").StringOptions): string;
458
+ _toString(_options?: import("./Node.js").StringOptions): string;
459
+ toJSON(): Record<string, unknown>;
460
+ toHTML(options?: import("./Node.js").StringOptions): string;
461
+ _toHTML(_options?: import("./Node.js").StringOptions): string;
462
+ toTex(options?: import("./Node.js").StringOptions): string;
463
+ toMarkdown(options?: {
464
+ inline?: boolean;
465
+ } & import("./Node.js").StringOptions): string;
466
+ toDOT(options?: {
467
+ name?: string;
468
+ }): string;
469
+ toMathML(): string;
470
+ _toMathML(): string;
471
+ _toTex(_options?: import("./Node.js").StringOptions): string;
472
+ _getCustomString(options?: import("./Node.js").StringOptions): string | undefined;
473
+ getIdentifier(): string;
474
+ getContent(): any;
475
+ } | null | undefined): boolean;
476
+ toString(options?: import("./Node.js").StringOptions): string;
477
+ toHTML(options?: import("./Node.js").StringOptions): string;
478
+ toTex(options?: import("./Node.js").StringOptions): string;
479
+ toMarkdown(options?: {
480
+ inline?: boolean;
481
+ } & import("./Node.js").StringOptions): string;
482
+ toDOT(options?: {
483
+ name?: string;
484
+ }): string;
485
+ toMathML(): string;
486
+ _toMathML(): string;
487
+ _getCustomString(options?: import("./Node.js").StringOptions): string | undefined;
488
+ getIdentifier(): string;
489
+ getContent(): {
490
+ get type(): string;
491
+ get isNode(): boolean;
492
+ evaluate(scope?: Record<string, unknown>): unknown;
493
+ compile(): import("./Node.js").CompiledExpression;
494
+ _compile(_math: Record<string, unknown>, _argNames: Record<string, boolean>): (scope: Map<string, unknown>, args: Record<string, unknown>, context: unknown) => unknown;
495
+ forEach(_callback: (child: any, path: string, parent: any) => void): void;
496
+ map(_callback: (child: any, path: string, parent: any) => any): any;
497
+ _ifNode(node: unknown): any;
498
+ traverse(callback: (node: any, path: string | null, parent: any | null) => void): void;
499
+ transform(callback: (node: any, path: string | null, parent: any | null) => any): any;
500
+ filter(callback: (node: any, path: string | null, parent: any | null) => boolean): any[];
501
+ clone(): any;
502
+ cloneDeep(): any;
503
+ equals(other: any | null | undefined): boolean;
504
+ toString(options?: import("./Node.js").StringOptions): string;
505
+ _toString(_options?: import("./Node.js").StringOptions): string;
506
+ toJSON(): Record<string, unknown>;
507
+ toHTML(options?: import("./Node.js").StringOptions): string;
508
+ _toHTML(_options?: import("./Node.js").StringOptions): string;
509
+ toTex(options?: import("./Node.js").StringOptions): string;
510
+ toMarkdown(options?: {
511
+ inline?: boolean;
512
+ } & import("./Node.js").StringOptions): string;
513
+ toDOT(options?: {
514
+ name?: string;
515
+ }): string;
516
+ toMathML(): string;
517
+ _toMathML(): string;
518
+ _toTex(_options?: import("./Node.js").StringOptions): string;
519
+ _getCustomString(options?: import("./Node.js").StringOptions): string | undefined;
520
+ getIdentifier(): string;
521
+ getContent(): any;
522
+ };
80
523
  };
81
524
  name: string;
82
525
  /**
83
526
  * Instantiate an OperatorNode from its JSON representation
84
- * @param {Object} json An object structured like
527
+ * @param json - An object structured like
85
528
  * `{"mathjs": "ObjectNode", "properties": {...}}`,
86
529
  * where mathjs is optional
87
- * @returns {ObjectNode}
88
530
  */
89
531
  fromJSON(json: {
90
- properties: Record<string, Node>;
532
+ properties: Record<string, MathNode>;
91
533
  }): {
92
- properties: Record<string, Node>;
534
+ get isNode(): boolean;
535
+ evaluate(scope?: Record<string, unknown>): unknown;
536
+ compile(): import("./Node.js").CompiledExpression;
537
+ _ifNode(node: unknown): {
538
+ get type(): string;
539
+ get isNode(): boolean;
540
+ evaluate(scope?: Record<string, unknown>): unknown;
541
+ compile(): import("./Node.js").CompiledExpression;
542
+ _compile(_math: Record<string, unknown>, _argNames: Record<string, boolean>): (scope: Map<string, unknown>, args: Record<string, unknown>, context: unknown) => unknown;
543
+ forEach(_callback: (child: /*elided*/ any, path: string, parent: /*elided*/ any) => void): void;
544
+ map(_callback: (child: /*elided*/ any, path: string, parent: /*elided*/ any) => /*elided*/ any): /*elided*/ any;
545
+ _ifNode(node: unknown): /*elided*/ any;
546
+ traverse(callback: (node: /*elided*/ any, path: string | null, parent: /*elided*/ any | null) => void): void;
547
+ transform(callback: (node: /*elided*/ any, path: string | null, parent: /*elided*/ any | null) => /*elided*/ any): /*elided*/ any;
548
+ filter(callback: (node: /*elided*/ any, path: string | null, parent: /*elided*/ any | null) => boolean): /*elided*/ any[];
549
+ clone(): /*elided*/ any;
550
+ cloneDeep(): /*elided*/ any;
551
+ equals(other: /*elided*/ any | null | undefined): boolean;
552
+ toString(options?: import("./Node.js").StringOptions): string;
553
+ _toString(_options?: import("./Node.js").StringOptions): string;
554
+ toJSON(): Record<string, unknown>;
555
+ toHTML(options?: import("./Node.js").StringOptions): string;
556
+ _toHTML(_options?: import("./Node.js").StringOptions): string;
557
+ toTex(options?: import("./Node.js").StringOptions): string;
558
+ toMarkdown(options?: {
559
+ inline?: boolean;
560
+ } & import("./Node.js").StringOptions): string;
561
+ toDOT(options?: {
562
+ name?: string;
563
+ }): string;
564
+ toMathML(): string;
565
+ _toMathML(): string;
566
+ _toTex(_options?: import("./Node.js").StringOptions): string;
567
+ _getCustomString(options?: import("./Node.js").StringOptions): string | undefined;
568
+ getIdentifier(): string;
569
+ getContent(): /*elided*/ any;
570
+ };
571
+ traverse(callback: (node: {
572
+ get type(): string;
573
+ get isNode(): boolean;
574
+ evaluate(scope?: Record<string, unknown>): unknown;
575
+ compile(): import("./Node.js").CompiledExpression;
576
+ _compile(_math: Record<string, unknown>, _argNames: Record<string, boolean>): (scope: Map<string, unknown>, args: Record<string, unknown>, context: unknown) => unknown;
577
+ forEach(_callback: (child: any, path: string, parent: any) => void): void;
578
+ map(_callback: (child: any, path: string, parent: any) => any): any;
579
+ _ifNode(node: unknown): any;
580
+ traverse(callback: (node: any, path: string | null, parent: any | null) => void): void;
581
+ transform(callback: (node: any, path: string | null, parent: any | null) => any): any;
582
+ filter(callback: (node: any, path: string | null, parent: any | null) => boolean): any[];
583
+ clone(): any;
584
+ cloneDeep(): any;
585
+ equals(other: any | null | undefined): boolean;
586
+ toString(options?: import("./Node.js").StringOptions): string;
587
+ _toString(_options?: import("./Node.js").StringOptions): string;
588
+ toJSON(): Record<string, unknown>;
589
+ toHTML(options?: import("./Node.js").StringOptions): string;
590
+ _toHTML(_options?: import("./Node.js").StringOptions): string;
591
+ toTex(options?: import("./Node.js").StringOptions): string;
592
+ toMarkdown(options?: {
593
+ inline?: boolean;
594
+ } & import("./Node.js").StringOptions): string;
595
+ toDOT(options?: {
596
+ name?: string;
597
+ }): string;
598
+ toMathML(): string;
599
+ _toMathML(): string;
600
+ _toTex(_options?: import("./Node.js").StringOptions): string;
601
+ _getCustomString(options?: import("./Node.js").StringOptions): string | undefined;
602
+ getIdentifier(): string;
603
+ getContent(): any;
604
+ }, path: string | null, parent: {
605
+ get type(): string;
606
+ get isNode(): boolean;
607
+ evaluate(scope?: Record<string, unknown>): unknown;
608
+ compile(): import("./Node.js").CompiledExpression;
609
+ _compile(_math: Record<string, unknown>, _argNames: Record<string, boolean>): (scope: Map<string, unknown>, args: Record<string, unknown>, context: unknown) => unknown;
610
+ forEach(_callback: (child: any, path: string, parent: any) => void): void;
611
+ map(_callback: (child: any, path: string, parent: any) => any): any;
612
+ _ifNode(node: unknown): any;
613
+ traverse(callback: (node: any, path: string | null, parent: any | null) => void): void;
614
+ transform(callback: (node: any, path: string | null, parent: any | null) => any): any;
615
+ filter(callback: (node: any, path: string | null, parent: any | null) => boolean): any[];
616
+ clone(): any;
617
+ cloneDeep(): any;
618
+ equals(other: any | null | undefined): boolean;
619
+ toString(options?: import("./Node.js").StringOptions): string;
620
+ _toString(_options?: import("./Node.js").StringOptions): string;
621
+ toJSON(): Record<string, unknown>;
622
+ toHTML(options?: import("./Node.js").StringOptions): string;
623
+ _toHTML(_options?: import("./Node.js").StringOptions): string;
624
+ toTex(options?: import("./Node.js").StringOptions): string;
625
+ toMarkdown(options?: {
626
+ inline?: boolean;
627
+ } & import("./Node.js").StringOptions): string;
628
+ toDOT(options?: {
629
+ name?: string;
630
+ }): string;
631
+ toMathML(): string;
632
+ _toMathML(): string;
633
+ _toTex(_options?: import("./Node.js").StringOptions): string;
634
+ _getCustomString(options?: import("./Node.js").StringOptions): string | undefined;
635
+ getIdentifier(): string;
636
+ getContent(): any;
637
+ } | null) => void): void;
638
+ properties: Record<string, MathNode>;
93
639
  get type(): string;
94
640
  get isObjectNode(): boolean;
95
641
  /**
96
642
  * Compile a node into a JavaScript function.
97
643
  * This basically pre-calculates as much as possible and only leaves open
98
644
  * calculations which depend on a dynamic scope with variables.
99
- * @param {Object} math Math.js namespace with functions and constants.
100
- * @param {Object} argNames An object with argument names as key and `true`
645
+ * @param math - Math.js namespace with functions and constants.
646
+ * @param argNames - An object with argument names as key and `true`
101
647
  * as value. Used in the SymbolNode to optimize
102
648
  * for arguments from user assigned functions
103
649
  * (see FunctionAssignmentNode) or special symbols
104
650
  * like `end` (see IndexNode).
105
- * @return {function} Returns a function which can be called like:
651
+ * @returns Returns a function which can be called like:
106
652
  * evalNode(scope: Object, args: Object, context: *)
107
653
  */
108
654
  _compile(math: Record<string, unknown>, argNames: Record<string, boolean>): CompileFunction;
109
655
  /**
110
656
  * Execute a callback for each of the child nodes of this node
111
- * @param {function(child: Node, path: string, parent: Node)} callback
657
+ * @param callback
112
658
  */
113
- forEach(callback: (child: Node, path: string, parent: /*elided*/ any) => void): void;
659
+ forEach(callback: (child: MathNode, path: string, parent: /*elided*/ any) => void): void;
114
660
  /**
115
661
  * Create a new ObjectNode whose children are the results of calling
116
662
  * the provided callback function for each child of the original node.
117
- * @param {function(child: Node, path: string, parent: Node): Node} callback
118
- * @returns {ObjectNode} Returns a transformed copy of the node
663
+ * @param callback
664
+ * @returns Returns a transformed copy of the node
119
665
  */
120
- map(callback: (child: Node, path: string, parent: /*elided*/ any) => Node): /*elided*/ any;
666
+ map(callback: (child: MathNode, path: string, parent: /*elided*/ any) => MathNode): /*elided*/ any;
121
667
  /**
122
668
  * Create a clone of this node, a shallow copy
123
- * @return {ObjectNode}
124
669
  */
125
670
  clone(): /*elided*/ any;
126
671
  /**
127
672
  * Get string representation
128
- * @param {Object} options
129
- * @return {string} str
673
+ * @param options
674
+ * @returns str
130
675
  * @override
131
676
  */
132
677
  _toString(options?: StringOptions): string;
133
678
  /**
134
679
  * Get a JSON representation of the node
135
- * @returns {Object}
136
680
  */
137
- toJSON(): Record<string, unknown>;
681
+ toJSON(): {
682
+ mathjs: string;
683
+ properties: Record<string, MathNode>;
684
+ };
138
685
  /**
139
686
  * Get HTML representation
140
- * @param {Object} options
141
- * @return {string} str
687
+ * @param options
688
+ * @returns str
142
689
  * @override
143
690
  */
144
691
  _toHTML(options?: StringOptions): string;
145
692
  /**
146
693
  * Get LaTeX representation
147
- * @param {Object} options
148
- * @return {string} str
694
+ * @param options
695
+ * @returns str
149
696
  */
150
697
  _toTex(options?: StringOptions): string;
151
- _ifNode: (node: unknown) => Node;
152
- toString: (options?: StringOptions) => string;
153
- toHTML: (options?: StringOptions) => string;
154
- toTex: (options?: StringOptions) => string;
698
+ transform(callback: (node: {
699
+ get type(): string;
700
+ get isNode(): boolean;
701
+ evaluate(scope?: Record<string, unknown>): unknown;
702
+ compile(): import("./Node.js").CompiledExpression;
703
+ _compile(_math: Record<string, unknown>, _argNames: Record<string, boolean>): (scope: Map<string, unknown>, args: Record<string, unknown>, context: unknown) => unknown;
704
+ forEach(_callback: (child: any, path: string, parent: any) => void): void;
705
+ map(_callback: (child: any, path: string, parent: any) => any): any;
706
+ _ifNode(node: unknown): any;
707
+ traverse(callback: (node: any, path: string | null, parent: any | null) => void): void;
708
+ transform(callback: (node: any, path: string | null, parent: any | null) => any): any;
709
+ filter(callback: (node: any, path: string | null, parent: any | null) => boolean): any[];
710
+ clone(): any;
711
+ cloneDeep(): any;
712
+ equals(other: any | null | undefined): boolean;
713
+ toString(options?: import("./Node.js").StringOptions): string;
714
+ _toString(_options?: import("./Node.js").StringOptions): string;
715
+ toJSON(): Record<string, unknown>;
716
+ toHTML(options?: import("./Node.js").StringOptions): string;
717
+ _toHTML(_options?: import("./Node.js").StringOptions): string;
718
+ toTex(options?: import("./Node.js").StringOptions): string;
719
+ toMarkdown(options?: {
720
+ inline?: boolean;
721
+ } & import("./Node.js").StringOptions): string;
722
+ toDOT(options?: {
723
+ name?: string;
724
+ }): string;
725
+ toMathML(): string;
726
+ _toMathML(): string;
727
+ _toTex(_options?: import("./Node.js").StringOptions): string;
728
+ _getCustomString(options?: import("./Node.js").StringOptions): string | undefined;
729
+ getIdentifier(): string;
730
+ getContent(): any;
731
+ }, path: string | null, parent: {
732
+ get type(): string;
733
+ get isNode(): boolean;
734
+ evaluate(scope?: Record<string, unknown>): unknown;
735
+ compile(): import("./Node.js").CompiledExpression;
736
+ _compile(_math: Record<string, unknown>, _argNames: Record<string, boolean>): (scope: Map<string, unknown>, args: Record<string, unknown>, context: unknown) => unknown;
737
+ forEach(_callback: (child: any, path: string, parent: any) => void): void;
738
+ map(_callback: (child: any, path: string, parent: any) => any): any;
739
+ _ifNode(node: unknown): any;
740
+ traverse(callback: (node: any, path: string | null, parent: any | null) => void): void;
741
+ transform(callback: (node: any, path: string | null, parent: any | null) => any): any;
742
+ filter(callback: (node: any, path: string | null, parent: any | null) => boolean): any[];
743
+ clone(): any;
744
+ cloneDeep(): any;
745
+ equals(other: any | null | undefined): boolean;
746
+ toString(options?: import("./Node.js").StringOptions): string;
747
+ _toString(_options?: import("./Node.js").StringOptions): string;
748
+ toJSON(): Record<string, unknown>;
749
+ toHTML(options?: import("./Node.js").StringOptions): string;
750
+ _toHTML(_options?: import("./Node.js").StringOptions): string;
751
+ toTex(options?: import("./Node.js").StringOptions): string;
752
+ toMarkdown(options?: {
753
+ inline?: boolean;
754
+ } & import("./Node.js").StringOptions): string;
755
+ toDOT(options?: {
756
+ name?: string;
757
+ }): string;
758
+ toMathML(): string;
759
+ _toMathML(): string;
760
+ _toTex(_options?: import("./Node.js").StringOptions): string;
761
+ _getCustomString(options?: import("./Node.js").StringOptions): string | undefined;
762
+ getIdentifier(): string;
763
+ getContent(): any;
764
+ } | null) => {
765
+ get type(): string;
766
+ get isNode(): boolean;
767
+ evaluate(scope?: Record<string, unknown>): unknown;
768
+ compile(): import("./Node.js").CompiledExpression;
769
+ _compile(_math: Record<string, unknown>, _argNames: Record<string, boolean>): (scope: Map<string, unknown>, args: Record<string, unknown>, context: unknown) => unknown;
770
+ forEach(_callback: (child: any, path: string, parent: any) => void): void;
771
+ map(_callback: (child: any, path: string, parent: any) => any): any;
772
+ _ifNode(node: unknown): any;
773
+ traverse(callback: (node: any, path: string | null, parent: any | null) => void): void;
774
+ transform(callback: (node: any, path: string | null, parent: any | null) => any): any;
775
+ filter(callback: (node: any, path: string | null, parent: any | null) => boolean): any[];
776
+ clone(): any;
777
+ cloneDeep(): any;
778
+ equals(other: any | null | undefined): boolean;
779
+ toString(options?: import("./Node.js").StringOptions): string;
780
+ _toString(_options?: import("./Node.js").StringOptions): string;
781
+ toJSON(): Record<string, unknown>;
782
+ toHTML(options?: import("./Node.js").StringOptions): string;
783
+ _toHTML(_options?: import("./Node.js").StringOptions): string;
784
+ toTex(options?: import("./Node.js").StringOptions): string;
785
+ toMarkdown(options?: {
786
+ inline?: boolean;
787
+ } & import("./Node.js").StringOptions): string;
788
+ toDOT(options?: {
789
+ name?: string;
790
+ }): string;
791
+ toMathML(): string;
792
+ _toMathML(): string;
793
+ _toTex(_options?: import("./Node.js").StringOptions): string;
794
+ _getCustomString(options?: import("./Node.js").StringOptions): string | undefined;
795
+ getIdentifier(): string;
796
+ getContent(): any;
797
+ }): {
798
+ get type(): string;
799
+ get isNode(): boolean;
800
+ evaluate(scope?: Record<string, unknown>): unknown;
801
+ compile(): import("./Node.js").CompiledExpression;
802
+ _compile(_math: Record<string, unknown>, _argNames: Record<string, boolean>): (scope: Map<string, unknown>, args: Record<string, unknown>, context: unknown) => unknown;
803
+ forEach(_callback: (child: any, path: string, parent: any) => void): void;
804
+ map(_callback: (child: any, path: string, parent: any) => any): any;
805
+ _ifNode(node: unknown): any;
806
+ traverse(callback: (node: any, path: string | null, parent: any | null) => void): void;
807
+ transform(callback: (node: any, path: string | null, parent: any | null) => any): any;
808
+ filter(callback: (node: any, path: string | null, parent: any | null) => boolean): any[];
809
+ clone(): any;
810
+ cloneDeep(): any;
811
+ equals(other: any | null | undefined): boolean;
812
+ toString(options?: import("./Node.js").StringOptions): string;
813
+ _toString(_options?: import("./Node.js").StringOptions): string;
814
+ toJSON(): Record<string, unknown>;
815
+ toHTML(options?: import("./Node.js").StringOptions): string;
816
+ _toHTML(_options?: import("./Node.js").StringOptions): string;
817
+ toTex(options?: import("./Node.js").StringOptions): string;
818
+ toMarkdown(options?: {
819
+ inline?: boolean;
820
+ } & import("./Node.js").StringOptions): string;
821
+ toDOT(options?: {
822
+ name?: string;
823
+ }): string;
824
+ toMathML(): string;
825
+ _toMathML(): string;
826
+ _toTex(_options?: import("./Node.js").StringOptions): string;
827
+ _getCustomString(options?: import("./Node.js").StringOptions): string | undefined;
828
+ getIdentifier(): string;
829
+ getContent(): any;
830
+ };
831
+ filter(callback: (node: {
832
+ get type(): string;
833
+ get isNode(): boolean;
834
+ evaluate(scope?: Record<string, unknown>): unknown;
835
+ compile(): import("./Node.js").CompiledExpression;
836
+ _compile(_math: Record<string, unknown>, _argNames: Record<string, boolean>): (scope: Map<string, unknown>, args: Record<string, unknown>, context: unknown) => unknown;
837
+ forEach(_callback: (child: any, path: string, parent: any) => void): void;
838
+ map(_callback: (child: any, path: string, parent: any) => any): any;
839
+ _ifNode(node: unknown): any;
840
+ traverse(callback: (node: any, path: string | null, parent: any | null) => void): void;
841
+ transform(callback: (node: any, path: string | null, parent: any | null) => any): any;
842
+ filter(callback: (node: any, path: string | null, parent: any | null) => boolean): any[];
843
+ clone(): any;
844
+ cloneDeep(): any;
845
+ equals(other: any | null | undefined): boolean;
846
+ toString(options?: import("./Node.js").StringOptions): string;
847
+ _toString(_options?: import("./Node.js").StringOptions): string;
848
+ toJSON(): Record<string, unknown>;
849
+ toHTML(options?: import("./Node.js").StringOptions): string;
850
+ _toHTML(_options?: import("./Node.js").StringOptions): string;
851
+ toTex(options?: import("./Node.js").StringOptions): string;
852
+ toMarkdown(options?: {
853
+ inline?: boolean;
854
+ } & import("./Node.js").StringOptions): string;
855
+ toDOT(options?: {
856
+ name?: string;
857
+ }): string;
858
+ toMathML(): string;
859
+ _toMathML(): string;
860
+ _toTex(_options?: import("./Node.js").StringOptions): string;
861
+ _getCustomString(options?: import("./Node.js").StringOptions): string | undefined;
862
+ getIdentifier(): string;
863
+ getContent(): any;
864
+ }, path: string | null, parent: {
865
+ get type(): string;
866
+ get isNode(): boolean;
867
+ evaluate(scope?: Record<string, unknown>): unknown;
868
+ compile(): import("./Node.js").CompiledExpression;
869
+ _compile(_math: Record<string, unknown>, _argNames: Record<string, boolean>): (scope: Map<string, unknown>, args: Record<string, unknown>, context: unknown) => unknown;
870
+ forEach(_callback: (child: any, path: string, parent: any) => void): void;
871
+ map(_callback: (child: any, path: string, parent: any) => any): any;
872
+ _ifNode(node: unknown): any;
873
+ traverse(callback: (node: any, path: string | null, parent: any | null) => void): void;
874
+ transform(callback: (node: any, path: string | null, parent: any | null) => any): any;
875
+ filter(callback: (node: any, path: string | null, parent: any | null) => boolean): any[];
876
+ clone(): any;
877
+ cloneDeep(): any;
878
+ equals(other: any | null | undefined): boolean;
879
+ toString(options?: import("./Node.js").StringOptions): string;
880
+ _toString(_options?: import("./Node.js").StringOptions): string;
881
+ toJSON(): Record<string, unknown>;
882
+ toHTML(options?: import("./Node.js").StringOptions): string;
883
+ _toHTML(_options?: import("./Node.js").StringOptions): string;
884
+ toTex(options?: import("./Node.js").StringOptions): string;
885
+ toMarkdown(options?: {
886
+ inline?: boolean;
887
+ } & import("./Node.js").StringOptions): string;
888
+ toDOT(options?: {
889
+ name?: string;
890
+ }): string;
891
+ toMathML(): string;
892
+ _toMathML(): string;
893
+ _toTex(_options?: import("./Node.js").StringOptions): string;
894
+ _getCustomString(options?: import("./Node.js").StringOptions): string | undefined;
895
+ getIdentifier(): string;
896
+ getContent(): any;
897
+ } | null) => boolean): {
898
+ get type(): string;
899
+ get isNode(): boolean;
900
+ evaluate(scope?: Record<string, unknown>): unknown;
901
+ compile(): import("./Node.js").CompiledExpression;
902
+ _compile(_math: Record<string, unknown>, _argNames: Record<string, boolean>): (scope: Map<string, unknown>, args: Record<string, unknown>, context: unknown) => unknown;
903
+ forEach(_callback: (child: any, path: string, parent: any) => void): void;
904
+ map(_callback: (child: any, path: string, parent: any) => any): any;
905
+ _ifNode(node: unknown): any;
906
+ traverse(callback: (node: any, path: string | null, parent: any | null) => void): void;
907
+ transform(callback: (node: any, path: string | null, parent: any | null) => any): any;
908
+ filter(callback: (node: any, path: string | null, parent: any | null) => boolean): any[];
909
+ clone(): any;
910
+ cloneDeep(): any;
911
+ equals(other: any | null | undefined): boolean;
912
+ toString(options?: import("./Node.js").StringOptions): string;
913
+ _toString(_options?: import("./Node.js").StringOptions): string;
914
+ toJSON(): Record<string, unknown>;
915
+ toHTML(options?: import("./Node.js").StringOptions): string;
916
+ _toHTML(_options?: import("./Node.js").StringOptions): string;
917
+ toTex(options?: import("./Node.js").StringOptions): string;
918
+ toMarkdown(options?: {
919
+ inline?: boolean;
920
+ } & import("./Node.js").StringOptions): string;
921
+ toDOT(options?: {
922
+ name?: string;
923
+ }): string;
924
+ toMathML(): string;
925
+ _toMathML(): string;
926
+ _toTex(_options?: import("./Node.js").StringOptions): string;
927
+ _getCustomString(options?: import("./Node.js").StringOptions): string | undefined;
928
+ getIdentifier(): string;
929
+ getContent(): any;
930
+ }[];
931
+ cloneDeep(): {
932
+ get type(): string;
933
+ get isNode(): boolean;
934
+ evaluate(scope?: Record<string, unknown>): unknown;
935
+ compile(): import("./Node.js").CompiledExpression;
936
+ _compile(_math: Record<string, unknown>, _argNames: Record<string, boolean>): (scope: Map<string, unknown>, args: Record<string, unknown>, context: unknown) => unknown;
937
+ forEach(_callback: (child: any, path: string, parent: any) => void): void;
938
+ map(_callback: (child: any, path: string, parent: any) => any): any;
939
+ _ifNode(node: unknown): any;
940
+ traverse(callback: (node: any, path: string | null, parent: any | null) => void): void;
941
+ transform(callback: (node: any, path: string | null, parent: any | null) => any): any;
942
+ filter(callback: (node: any, path: string | null, parent: any | null) => boolean): any[];
943
+ clone(): any;
944
+ cloneDeep(): any;
945
+ equals(other: any | null | undefined): boolean;
946
+ toString(options?: import("./Node.js").StringOptions): string;
947
+ _toString(_options?: import("./Node.js").StringOptions): string;
948
+ toJSON(): Record<string, unknown>;
949
+ toHTML(options?: import("./Node.js").StringOptions): string;
950
+ _toHTML(_options?: import("./Node.js").StringOptions): string;
951
+ toTex(options?: import("./Node.js").StringOptions): string;
952
+ toMarkdown(options?: {
953
+ inline?: boolean;
954
+ } & import("./Node.js").StringOptions): string;
955
+ toDOT(options?: {
956
+ name?: string;
957
+ }): string;
958
+ toMathML(): string;
959
+ _toMathML(): string;
960
+ _toTex(_options?: import("./Node.js").StringOptions): string;
961
+ _getCustomString(options?: import("./Node.js").StringOptions): string | undefined;
962
+ getIdentifier(): string;
963
+ getContent(): any;
964
+ };
965
+ equals(other: {
966
+ get type(): string;
967
+ get isNode(): boolean;
968
+ evaluate(scope?: Record<string, unknown>): unknown;
969
+ compile(): import("./Node.js").CompiledExpression;
970
+ _compile(_math: Record<string, unknown>, _argNames: Record<string, boolean>): (scope: Map<string, unknown>, args: Record<string, unknown>, context: unknown) => unknown;
971
+ forEach(_callback: (child: any, path: string, parent: any) => void): void;
972
+ map(_callback: (child: any, path: string, parent: any) => any): any;
973
+ _ifNode(node: unknown): any;
974
+ traverse(callback: (node: any, path: string | null, parent: any | null) => void): void;
975
+ transform(callback: (node: any, path: string | null, parent: any | null) => any): any;
976
+ filter(callback: (node: any, path: string | null, parent: any | null) => boolean): any[];
977
+ clone(): any;
978
+ cloneDeep(): any;
979
+ equals(other: any | null | undefined): boolean;
980
+ toString(options?: import("./Node.js").StringOptions): string;
981
+ _toString(_options?: import("./Node.js").StringOptions): string;
982
+ toJSON(): Record<string, unknown>;
983
+ toHTML(options?: import("./Node.js").StringOptions): string;
984
+ _toHTML(_options?: import("./Node.js").StringOptions): string;
985
+ toTex(options?: import("./Node.js").StringOptions): string;
986
+ toMarkdown(options?: {
987
+ inline?: boolean;
988
+ } & import("./Node.js").StringOptions): string;
989
+ toDOT(options?: {
990
+ name?: string;
991
+ }): string;
992
+ toMathML(): string;
993
+ _toMathML(): string;
994
+ _toTex(_options?: import("./Node.js").StringOptions): string;
995
+ _getCustomString(options?: import("./Node.js").StringOptions): string | undefined;
996
+ getIdentifier(): string;
997
+ getContent(): any;
998
+ } | null | undefined): boolean;
999
+ toString(options?: import("./Node.js").StringOptions): string;
1000
+ toHTML(options?: import("./Node.js").StringOptions): string;
1001
+ toTex(options?: import("./Node.js").StringOptions): string;
1002
+ toMarkdown(options?: {
1003
+ inline?: boolean;
1004
+ } & import("./Node.js").StringOptions): string;
1005
+ toDOT(options?: {
1006
+ name?: string;
1007
+ }): string;
1008
+ toMathML(): string;
1009
+ _toMathML(): string;
1010
+ _getCustomString(options?: import("./Node.js").StringOptions): string | undefined;
1011
+ getIdentifier(): string;
1012
+ getContent(): {
1013
+ get type(): string;
1014
+ get isNode(): boolean;
1015
+ evaluate(scope?: Record<string, unknown>): unknown;
1016
+ compile(): import("./Node.js").CompiledExpression;
1017
+ _compile(_math: Record<string, unknown>, _argNames: Record<string, boolean>): (scope: Map<string, unknown>, args: Record<string, unknown>, context: unknown) => unknown;
1018
+ forEach(_callback: (child: any, path: string, parent: any) => void): void;
1019
+ map(_callback: (child: any, path: string, parent: any) => any): any;
1020
+ _ifNode(node: unknown): any;
1021
+ traverse(callback: (node: any, path: string | null, parent: any | null) => void): void;
1022
+ transform(callback: (node: any, path: string | null, parent: any | null) => any): any;
1023
+ filter(callback: (node: any, path: string | null, parent: any | null) => boolean): any[];
1024
+ clone(): any;
1025
+ cloneDeep(): any;
1026
+ equals(other: any | null | undefined): boolean;
1027
+ toString(options?: import("./Node.js").StringOptions): string;
1028
+ _toString(_options?: import("./Node.js").StringOptions): string;
1029
+ toJSON(): Record<string, unknown>;
1030
+ toHTML(options?: import("./Node.js").StringOptions): string;
1031
+ _toHTML(_options?: import("./Node.js").StringOptions): string;
1032
+ toTex(options?: import("./Node.js").StringOptions): string;
1033
+ toMarkdown(options?: {
1034
+ inline?: boolean;
1035
+ } & import("./Node.js").StringOptions): string;
1036
+ toDOT(options?: {
1037
+ name?: string;
1038
+ }): string;
1039
+ toMathML(): string;
1040
+ _toMathML(): string;
1041
+ _toTex(_options?: import("./Node.js").StringOptions): string;
1042
+ _getCustomString(options?: import("./Node.js").StringOptions): string | undefined;
1043
+ getIdentifier(): string;
1044
+ getContent(): any;
1045
+ };
155
1046
  };
156
1047
  }>;
157
1048
  export {};