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

225 lines
5.0 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 146,
"end": 271,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 146,
"end": 182,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 152,
"end": 181,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 152,
"end": 153,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ArrowFunctionExpression",
"span": {
"start": 156,
"end": 181,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 157,
"end": 158,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": null
}
],
"body": {
"type": "BlockStatement",
"span": {
"start": 163,
"end": 181,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 169,
"end": 179,
"ctxt": 0
},
"argument": {
"type": "StringLiteral",
"span": {
"start": 176,
"end": 178,
"ctxt": 0
},
"value": "",
"raw": "''"
}
}
]
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
},
"definite": false
}
]
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 225,
"end": 226,
"ctxt": 0
},
"value": "b",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 216,
"end": 246,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 229,
"end": 246,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 235,
"end": 244,
"ctxt": 0
},
"argument": {
"type": "NumericLiteral",
"span": {
"start": 242,
"end": 243,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 248,
"end": 271,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 248,
"end": 271,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 248,
"end": 262,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 248,
"end": 254,
"ctxt": 0
},
"value": "module",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 255,
"end": 262,
"ctxt": 0
},
"value": "exports",
"optional": false
}
},
"right": {
"type": "ObjectExpression",
"span": {
"start": 265,
"end": 271,
"ctxt": 0
},
"properties": [
{
"type": "Identifier",
"span": {
"start": 266,
"end": 267,
"ctxt": 0
},
"value": "x",
"optional": false
},
{
"type": "Identifier",
"span": {
"start": 269,
"end": 270,
"ctxt": 0
},
"value": "b",
"optional": false
}
]
}
}
}
],
"interpreter": null
}