Missing node types in MathNode interface (#52778)
Missing node types in MathNode interface (#52778)

* Missing node types in MathNode interface 

We are missing  
1. object (for AccessorNode)
2. condition  (for ConditionalNode)
as MathNode type

Egs:- 

parsing expresion  **[1,2,3].contains(5)** yields
{
          "mathjs": "FunctionNode",
          "fn": {
                    "mathjs": "AccessorNode",
                   * "object": {*
                              "mathjs": "ArrayNode",
                              "items": [
                                        {
                                                  "mathjs": "ConstantNode",
                                                  "value": 1
                                        },
                               ............

parsing expression **3 + (r < 4 ? 5 : 3)** yields

{
          "mathjs": "OperatorNode",
          "op": "+",
          "fn": "add",
          "args": [
                    {
                              "mathjs": "ConstantNode",
                              "value": 3
                    },
                    {
                              "mathjs": "ParenthesisNode",
                              "content": {
                                        "mathjs": "ConditionalNode",
                                        **"condition": {**
                                                  "mathjs": "OperatorNode",
                                                  "op": "<",
                                                  "fn": "smaller",

* made added types optional

* Accessor Node have a child node call index node

Expresssion to parse [1,2,3].contains(5)

Expression Tree:
{
          "mathjs": "FunctionNode",
          "fn": {
                    "mathjs": "AccessorNode",
                    "object": {
                              "mathjs": "ArrayNode",
                              "items": [
                                        {
                                                  "mathjs": "ConstantNode",
                                                  "value": 1
                                        },
                                        {
                                                  "mathjs": "ConstantNode",
                                                  "value": 2
                                        },
                                        {
                                                  "mathjs": "ConstantNode",
                                                  "value": 3
                                        }
                              ]
                    },
                    "index": {
                              "mathjs": "IndexNode",
                              "dimensions": [
                                        {
                                                  "mathjs": "ConstantNode",
                                                  "value": "contains"
                                        }
                              ],
                              "dotNotation": true

* dimensions is an Array of MathNodes

* Conditional nodes have true and false expression

* fn property of a Node can be a MathNode as well.

* Added Missing Index Node

* Update index.d.ts

* Adding items (array of MathNodes) children of ArrayNode
georgemarshall/DefinitelyTyped,georgemarshall/DefinitelyTyped,markogresak/DefinitelyTyped,georgemarshall/DefinitelyTyped,georgemarshall/DefinitelyTyped