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