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

177 lines
4.7 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 18,
"end": 128,
"ctxt": 0
},
"body": [
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 27,
"end": 28,
"ctxt": 0
},
"value": "f",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 18,
"end": 128,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 31,
"end": 128,
"ctxt": 0
},
"stmts": [
{
"type": "IfStatement",
"span": {
"start": 37,
"end": 126,
"ctxt": 0
},
"test": {
"type": "CallExpression",
"span": {
"start": 41,
"end": 54,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 41,
"end": 52,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 41,
"end": 45,
"ctxt": 0
},
"value": "Math",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 46,
"end": 52,
"ctxt": 0
},
"value": "random",
"optional": false
}
},
"arguments": [],
"typeArguments": null
},
"consequent": {
"type": "BlockStatement",
"span": {
"start": 56,
"end": 126,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 66,
"end": 88,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 72,
"end": 87,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 72,
"end": 81,
"ctxt": 0
},
"value": "arguments",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 84,
"end": 87,
"ctxt": 0
},
"value": 100.0,
"raw": "100"
},
"definite": false
}
]
},
{
"type": "ReturnStatement",
"span": {
"start": 97,
"end": 120,
"ctxt": 0
},
"argument": {
"type": "ArrowFunctionExpression",
"span": {
"start": 104,
"end": 119,
"ctxt": 0
},
"params": [],
"body": {
"type": "Identifier",
"span": {
"start": 110,
"end": 119,
"ctxt": 0
},
"value": "arguments",
"optional": false
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
}
}
]
},
"alternate": null
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
}
],
"interpreter": null
}