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

192 lines
4.1 KiB
JSON

{
"type": "Script",
"span": {
"start": 74,
"end": 170,
"ctxt": 0
},
"body": [
{
"type": "TsModuleDeclaration",
"span": {
"start": 74,
"end": 122,
"ctxt": 0
},
"declare": true,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 92,
"end": 93,
"ctxt": 0
},
"value": "C",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 94,
"end": 122,
"ctxt": 0
},
"body": [
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 109,
"end": 112,
"ctxt": 0
},
"value": "bar",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 100,
"end": 120,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 114,
"end": 120,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 116,
"end": 120,
"ctxt": 0
},
"kind": "void"
}
}
}
]
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 142,
"end": 159,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 142,
"end": 158,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 142,
"end": 153,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 142,
"end": 143,
"ctxt": 0
},
"value": "C",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 144,
"end": 153,
"ctxt": 0
},
"value": "prototype",
"optional": false
}
},
"right": {
"type": "ObjectExpression",
"span": {
"start": 156,
"end": 158,
"ctxt": 0
},
"properties": []
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 160,
"end": 170,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 160,
"end": 169,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 160,
"end": 165,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 160,
"end": 161,
"ctxt": 0
},
"value": "C",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 162,
"end": 165,
"ctxt": 0
},
"value": "bar",
"optional": false
}
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 168,
"end": 169,
"ctxt": 0
},
"value": 2.0
}
}
}
],
"interpreter": null
}