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

224 lines
4.9 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 145,
"end": 270,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 145,
"end": 181,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 151,
"end": 180,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 151,
"end": 152,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ArrowFunctionExpression",
"span": {
"start": 155,
"end": 180,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 156,
"end": 157,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
}
],
"body": {
"type": "BlockStatement",
"span": {
"start": 162,
"end": 180,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 168,
"end": 178,
"ctxt": 0
},
"argument": {
"type": "StringLiteral",
"span": {
"start": 175,
"end": 177,
"ctxt": 0
},
"value": "",
"raw": "''"
}
}
]
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
},
"definite": false
}
]
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 224,
"end": 225,
"ctxt": 0
},
"value": "b",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 215,
"end": 245,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 228,
"end": 245,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 234,
"end": 243,
"ctxt": 0
},
"argument": {
"type": "NumericLiteral",
"span": {
"start": 241,
"end": 242,
"ctxt": 0
},
"value": 0.0
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 247,
"end": 270,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 247,
"end": 270,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 247,
"end": 261,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 247,
"end": 253,
"ctxt": 0
},
"value": "module",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 254,
"end": 261,
"ctxt": 0
},
"value": "exports",
"optional": false
}
},
"right": {
"type": "ObjectExpression",
"span": {
"start": 264,
"end": 270,
"ctxt": 0
},
"properties": [
{
"type": "Identifier",
"span": {
"start": 265,
"end": 266,
"ctxt": 0
},
"value": "x",
"optional": false
},
{
"type": "Identifier",
"span": {
"start": 268,
"end": 269,
"ctxt": 0
},
"value": "b",
"optional": false
}
]
}
}
}
],
"interpreter": null
}