# 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:2:9

private const a

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

private const a1

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

private const a2

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

private const b

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

private const b1

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

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

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

private const rest


# output.json
[
  {
    "name": "obj",
    "isDefault": false,
    "location": {
      "filename": "file:///mod.ts",
      "line": 1,
      "col": 6,
      "byteIndex": 6
    },
    "declarationKind": "private",
    "kind": "variable",
    "variableDef": {
      "tsType": {
        "repr": "",
        "kind": "typeLiteral",
        "typeLiteral": {
          "constructors": [],
          "methods": [],
          "properties": [
            {
              "name": "a",
              "location": {
                "filename": "file:///mod.ts",
                "line": 1,
                "col": 14,
                "byteIndex": 14
              },
              "params": [],
              "computed": false,
              "optional": false,
              "tsType": {
                "repr": "string",
                "kind": "keyword",
                "keyword": "string"
              },
              "typeParams": []
            },
            {
              "name": "b",
              "location": {
                "filename": "file:///mod.ts",
                "line": 1,
                "col": 24,
                "byteIndex": 24
              },
              "params": [],
              "computed": false,
              "optional": false,
              "tsType": {
                "repr": "string",
                "kind": "keyword",
                "keyword": "string"
              },
              "typeParams": []
            }
          ],
          "callSignatures": [],
          "indexSignatures": []
        }
      },
      "kind": "const"
    }
  },
  {
    "name": "a",
    "isDefault": false,
    "location": {
      "filename": "file:///mod.ts",
      "line": 2,
      "col": 8,
      "byteIndex": 44
    },
    "declarationKind": "private",
    "kind": "variable",
    "variableDef": {
      "tsType": null,
      "kind": "const"
    }
  },
  {
    "name": "b",
    "isDefault": false,
    "location": {
      "filename": "file:///mod.ts",
      "line": 2,
      "col": 11,
      "byteIndex": 47
    },
    "declarationKind": "private",
    "kind": "variable",
    "variableDef": {
      "tsType": null,
      "kind": "const"
    }
  },
  {
    "name": "rest",
    "isDefault": false,
    "location": {
      "filename": "file:///mod.ts",
      "line": 2,
      "col": 17,
      "byteIndex": 53
    },
    "declarationKind": "private",
    "kind": "variable",
    "variableDef": {
      "tsType": null,
      "kind": "const"
    }
  },
  {
    "name": "a1",
    "isDefault": false,
    "location": {
      "filename": "file:///mod.ts",
      "line": 3,
      "col": 11,
      "byteIndex": 78
    },
    "declarationKind": "private",
    "kind": "variable",
    "variableDef": {
      "tsType": null,
      "kind": "const"
    }
  },
  {
    "name": "b1",
    "isDefault": false,
    "location": {
      "filename": "file:///mod.ts",
      "line": 3,
      "col": 18,
      "byteIndex": 85
    },
    "declarationKind": "private",
    "kind": "variable",
    "variableDef": {
      "tsType": null,
      "kind": "const"
    }
  },
  {
    "name": "a2",
    "isDefault": false,
    "location": {
      "filename": "file:///mod.ts",
      "line": 4,
      "col": 15,
      "byteIndex": 112
    },
    "declarationKind": "private",
    "kind": "variable",
    "variableDef": {
      "tsType": null,
      "kind": "const"
    }
  }
]
