---
source: crates/react_hermes_parser/tests/parser_test.rs
expression: "format!(\"Input:\\n{input}\\n\\nOutput:\\n{output}\")"
input_file: crates/react_hermes_parser/tests/fixtures/infer-property-delete.js
---
Input:
function Component(props) {
  const x = makeObject();
  const y = delete x.value;
  return y;
}


Output:
{
  "type": "Program",
  "body": [
    {
      "type": "FunctionDeclaration",
      "id": {
        "type": "Identifier",
        "name": "Component",
        "typeAnnotation": null,
        "loc": null,
        "range": [
          9,
          18
        ]
      },
      "params": [
        {
          "type": "Identifier",
          "name": "props",
          "typeAnnotation": null,
          "loc": null,
          "range": [
            19,
            24
          ]
        }
      ],
      "body": {
        "type": "BlockStatement",
        "body": [
          {
            "type": "VariableDeclaration",
            "kind": "const",
            "declarations": [
              {
                "type": "VariableDeclarator",
                "id": {
                  "type": "Identifier",
                  "name": "x",
                  "typeAnnotation": null,
                  "loc": null,
                  "range": [
                    36,
                    37
                  ]
                },
                "init": {
                  "type": "CallExpression",
                  "callee": {
                    "type": "Identifier",
                    "name": "makeObject",
                    "typeAnnotation": null,
                    "loc": null,
                    "range": [
                      40,
                      50
                    ]
                  },
                  "arguments": [],
                  "loc": null,
                  "range": [
                    40,
                    52
                  ]
                },
                "loc": null,
                "range": [
                  36,
                  52
                ]
              }
            ],
            "loc": null,
            "range": [
              30,
              53
            ]
          },
          {
            "type": "VariableDeclaration",
            "kind": "const",
            "declarations": [
              {
                "type": "VariableDeclarator",
                "id": {
                  "type": "Identifier",
                  "name": "y",
                  "typeAnnotation": null,
                  "loc": null,
                  "range": [
                    62,
                    63
                  ]
                },
                "init": {
                  "type": "UnaryExpression",
                  "operator": "delete",
                  "prefix": true,
                  "argument": {
                    "type": "MemberExpression",
                    "object": {
                      "type": "Identifier",
                      "name": "x",
                      "typeAnnotation": null,
                      "loc": null,
                      "range": [
                        73,
                        74
                      ]
                    },
                    "property": {
                      "type": "Identifier",
                      "name": "value",
                      "typeAnnotation": null,
                      "loc": null,
                      "range": [
                        75,
                        80
                      ]
                    },
                    "computed": false,
                    "loc": null,
                    "range": [
                      73,
                      80
                    ]
                  },
                  "loc": null,
                  "range": [
                    66,
                    80
                  ]
                },
                "loc": null,
                "range": [
                  62,
                  80
                ]
              }
            ],
            "loc": null,
            "range": [
              56,
              81
            ]
          },
          {
            "type": "ReturnStatement",
            "argument": {
              "type": "Identifier",
              "name": "y",
              "typeAnnotation": null,
              "loc": null,
              "range": [
                91,
                92
              ]
            },
            "loc": null,
            "range": [
              84,
              93
            ]
          }
        ],
        "loc": null,
        "range": [
          26,
          95
        ]
      },
      "generator": false,
      "async": false,
      "loc": null,
      "range": [
        0,
        95
      ],
      "loc": null,
      "range": [
        0,
        95
      ]
    }
  ],
  "sourceType": "script",
  "loc": null,
  "range": [
    0,
    95
  ]
}
