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

239 lines
5.5 KiB
JSON

{
"type": "Script",
"span": {
"start": 72,
"end": 188,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 72,
"end": 103,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 81,
"end": 103,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 81,
"end": 82,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "FunctionExpression",
"identifier": {
"type": "Identifier",
"span": {
"start": 94,
"end": 97,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"params": [],
"decorators": [],
"span": {
"start": 85,
"end": 103,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 100,
"end": 103,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 104,
"end": 128,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 104,
"end": 128,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 104,
"end": 107,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 104,
"end": 105,
"ctxt": 0
},
"value": "x",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 106,
"end": 107,
"ctxt": 0
},
"value": "a",
"optional": false
}
},
"right": {
"type": "FunctionExpression",
"identifier": {
"type": "Identifier",
"span": {
"start": 119,
"end": 122,
"ctxt": 0
},
"value": "bar",
"optional": false
},
"params": [],
"decorators": [],
"span": {
"start": 110,
"end": 128,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 125,
"end": 128,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 148,
"end": 188,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 152,
"end": 187,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 152,
"end": 153,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 156,
"end": 187,
"ctxt": 0
},
"callee": {
"type": "FunctionExpression",
"identifier": null,
"params": [],
"decorators": [],
"span": {
"start": 156,
"end": 185,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 168,
"end": 185,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 174,
"end": 183,
"ctxt": 0
},
"argument": {
"type": "NumericLiteral",
"span": {
"start": 181,
"end": 182,
"ctxt": 0
},
"value": 1.0
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"arguments": [],
"typeArguments": null
},
"definite": false
}
]
}
],
"interpreter": null
}