swc/crates/swc_ecma_parser/tests/tsc/declarationInAmbientContext.json

140 lines
3.2 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 0,
"end": 107,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 0,
"end": 19,
"ctxt": 0
},
"kind": "var",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 12,
"end": 18,
"ctxt": 0
},
"id": {
"type": "ArrayPattern",
"span": {
"start": 12,
"end": 18,
"ctxt": 0
},
"elements": [
{
"type": "Identifier",
"span": {
"start": 13,
"end": 14,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
},
{
"type": "Identifier",
"span": {
"start": 16,
"end": 17,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": null
}
],
"optional": false,
"typeAnnotation": null
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 88,
"end": 107,
"ctxt": 0
},
"kind": "var",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 100,
"end": 106,
"ctxt": 0
},
"id": {
"type": "ObjectPattern",
"span": {
"start": 100,
"end": 106,
"ctxt": 0
},
"properties": [
{
"type": "AssignmentPatternProperty",
"span": {
"start": 101,
"end": 102,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 101,
"end": 102,
"ctxt": 0
},
"value": "c",
"optional": false
},
"value": null
},
{
"type": "AssignmentPatternProperty",
"span": {
"start": 104,
"end": 105,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 104,
"end": 105,
"ctxt": 0
},
"value": "d",
"optional": false
},
"value": null
}
],
"optional": false,
"typeAnnotation": null
},
"init": null,
"definite": false
}
]
}
],
"interpreter": null
}