# mod.ts
const obj = { a: "foo", b: "bar" };
const { a, b, ...rest } = obj;
const { a: a1, b: b1 } = obj;
const { ["a"]: a2 } = obj;

# output.txt
Defined in file:///mod.ts:1:9

private const a

Defined in file:///mod.ts:2:12

private const a1

Defined in file:///mod.ts:3:16

private const a2

Defined in file:///mod.ts:1:12

private const b

Defined in file:///mod.ts:2:19

private const b1

Defined in file:///mod.ts:0:7

private const obj: { a: string; b: string; }

Defined in file:///mod.ts:1:18

private const rest


# output.json
{
  "symbols": [
    {
      "name": "obj",
      "declarations": [
        {
          "location": {
            "filename": "file:///mod.ts",
            "line": 0,
            "col": 6,
            "byteIndex": 6
          },
          "declarationKind": "private",
          "kind": "variable",
          "def": {
            "tsType": {
              "kind": "typeLiteral",
              "value": {
                "properties": [
                  {
                    "name": "a",
                    "location": {
                      "filename": "file:///mod.ts",
                      "line": 0,
                      "col": 14,
                      "byteIndex": 14
                    },
                    "tsType": {
                      "repr": "string",
                      "kind": "keyword",
                      "value": "string"
                    }
                  },
                  {
                    "name": "b",
                    "location": {
                      "filename": "file:///mod.ts",
                      "line": 0,
                      "col": 24,
                      "byteIndex": 24
                    },
                    "tsType": {
                      "repr": "string",
                      "kind": "keyword",
                      "value": "string"
                    }
                  }
                ]
              }
            },
            "kind": "const"
          }
        }
      ]
    },
    {
      "name": "a",
      "declarations": [
        {
          "location": {
            "filename": "file:///mod.ts",
            "line": 1,
            "col": 8,
            "byteIndex": 44
          },
          "declarationKind": "private",
          "kind": "variable",
          "def": {
            "kind": "const"
          }
        }
      ]
    },
    {
      "name": "b",
      "declarations": [
        {
          "location": {
            "filename": "file:///mod.ts",
            "line": 1,
            "col": 11,
            "byteIndex": 47
          },
          "declarationKind": "private",
          "kind": "variable",
          "def": {
            "kind": "const"
          }
        }
      ]
    },
    {
      "name": "rest",
      "declarations": [
        {
          "location": {
            "filename": "file:///mod.ts",
            "line": 1,
            "col": 17,
            "byteIndex": 53
          },
          "declarationKind": "private",
          "kind": "variable",
          "def": {
            "kind": "const"
          }
        }
      ]
    },
    {
      "name": "a1",
      "declarations": [
        {
          "location": {
            "filename": "file:///mod.ts",
            "line": 2,
            "col": 11,
            "byteIndex": 78
          },
          "declarationKind": "private",
          "kind": "variable",
          "def": {
            "kind": "const"
          }
        }
      ]
    },
    {
      "name": "b1",
      "declarations": [
        {
          "location": {
            "filename": "file:///mod.ts",
            "line": 2,
            "col": 18,
            "byteIndex": 85
          },
          "declarationKind": "private",
          "kind": "variable",
          "def": {
            "kind": "const"
          }
        }
      ]
    },
    {
      "name": "a2",
      "declarations": [
        {
          "location": {
            "filename": "file:///mod.ts",
            "line": 3,
            "col": 15,
            "byteIndex": 112
          },
          "declarationKind": "private",
          "kind": "variable",
          "def": {
            "kind": "const"
          }
        }
      ]
    }
  ]
}
