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

153 lines
3.8 KiB
JSON

{
"type": "Script",
"span": {
"start": 1,
"end": 45,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 1,
"end": 45,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 5,
"end": 44,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 5,
"end": 6,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "BinaryExpression",
"span": {
"start": 9,
"end": 44,
"ctxt": 0
},
"operator": "in",
"left": {
"type": "TemplateLiteral",
"span": {
"start": 9,
"end": 20,
"ctxt": 0
},
"expressions": [
{
"type": "StringLiteral",
"span": {
"start": 13,
"end": 17,
"ctxt": 0
},
"value": "hi",
"raw": "\"hi\""
}
],
"quasis": [
{
"type": "TemplateElement",
"span": {
"start": 10,
"end": 10,
"ctxt": 0
},
"tail": false,
"cooked": "",
"raw": ""
},
{
"type": "TemplateElement",
"span": {
"start": 19,
"end": 19,
"ctxt": 0
},
"tail": true,
"cooked": "",
"raw": ""
}
]
},
"right": {
"type": "ObjectExpression",
"span": {
"start": 24,
"end": 44,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 26,
"end": 28,
"ctxt": 0
},
"value": "hi",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 30,
"end": 32,
"ctxt": 0
},
"value": 10.0,
"raw": "10"
}
},
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 34,
"end": 39,
"ctxt": 0
},
"value": "hello",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 41,
"end": 43,
"ctxt": 0
},
"value": 20.0,
"raw": "20"
}
}
]
}
},
"definite": false
}
]
}
],
"interpreter": null
}