swc/crates/swc_ecma_parser/tests/tsc/globalThisReadonlyProperties.json
2022-02-04 17:08:38 +09:00

273 lines
5.7 KiB
JSON

{
"type": "Script",
"span": {
"start": 0,
"end": 104,
"ctxt": 0
},
"body": [
{
"type": "ExpressionStatement",
"span": {
"start": 0,
"end": 32,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 0,
"end": 32,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 0,
"end": 21,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 0,
"end": 10,
"ctxt": 0
},
"value": "globalThis",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 11,
"end": 21,
"ctxt": 0
},
"value": "globalThis",
"optional": false
}
},
"right": {
"type": "TsAsExpression",
"span": {
"start": 24,
"end": 32,
"ctxt": 0
},
"expression": {
"type": "NumericLiteral",
"span": {
"start": 24,
"end": 25,
"ctxt": 0
},
"value": 1.0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 29,
"end": 32,
"ctxt": 0
},
"kind": "any"
}
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 49,
"end": 58,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 53,
"end": 58,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 53,
"end": 54,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 57,
"end": 58,
"ctxt": 0
},
"value": 1.0
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 59,
"end": 70,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 65,
"end": 70,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 65,
"end": 66,
"ctxt": 0
},
"value": "y",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 69,
"end": 70,
"ctxt": 0
},
"value": 2.0
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 71,
"end": 87,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 71,
"end": 87,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 71,
"end": 83,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 71,
"end": 81,
"ctxt": 0
},
"value": "globalThis",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 82,
"end": 83,
"ctxt": 0
},
"value": "x",
"optional": false
}
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 86,
"end": 87,
"ctxt": 0
},
"value": 3.0
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 88,
"end": 104,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 88,
"end": 104,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 88,
"end": 100,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 88,
"end": 98,
"ctxt": 0
},
"value": "globalThis",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 99,
"end": 100,
"ctxt": 0
},
"value": "y",
"optional": false
}
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 103,
"end": 104,
"ctxt": 0
},
"value": 4.0
}
}
}
],
"interpreter": null
}