swc/crates/swc_ecma_parser/tests/tsc/for-of11.json

129 lines
2.6 KiB
JSON

{
"type": "Script",
"span": {
"start": 15,
"end": 52,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 15,
"end": 29,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 19,
"end": 28,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 19,
"end": 20,
"ctxt": 0
},
"value": "v",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 20,
"end": 28,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 22,
"end": 28,
"ctxt": 0
},
"kind": "string"
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "ForOfStatement",
"span": {
"start": 30,
"end": 52,
"ctxt": 0
},
"await": null,
"left": {
"type": "Identifier",
"span": {
"start": 35,
"end": 36,
"ctxt": 0
},
"value": "v",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "ArrayExpression",
"span": {
"start": 40,
"end": 47,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 41,
"end": 42,
"ctxt": 0
},
"value": 0.0
}
},
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 44,
"end": 46,
"ctxt": 0
},
"value": "",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
]
},
"body": {
"type": "BlockStatement",
"span": {
"start": 49,
"end": 52,
"ctxt": 0
},
"stmts": []
}
}
],
"interpreter": null
}