Skip to content

Commit

Permalink
docs: fix misleading documentation for expression tree traverse (#3177)
Browse files Browse the repository at this point in the history
Callback function for MathNode.traverse() returns void. Documentation says callback must return a replacement for the existing node (possibly copied from transform() above).
  • Loading branch information
rohildshah authored Mar 21, 2024
1 parent c592219 commit a29bab4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/expressions/expression_trees.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ All nodes have the following methods:
this node and each of its child nodes. Similar to `Array.forEach`, except
recursive.
The callback function is a mapping function accepting a node, and returning
a replacement for the node or the original node. Function `callback` is
nothing. Function `callback` is
called as `callback(node: Node, path: string, parent: Node)` for every node
in the tree. Parameter `path` is a string containing a relative JSON Path.
Example:
Expand Down

0 comments on commit a29bab4

Please sign in to comment.