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

150 lines
3.3 KiB
JSON

{
"type": "Script",
"span": {
"start": 15,
"end": 68,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 15,
"end": 42,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 19,
"end": 41,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 19,
"end": 23,
"ctxt": 0
},
"value": "iter",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 23,
"end": 41,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 25,
"end": 41,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 25,
"end": 33,
"ctxt": 0
},
"value": "Iterable",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 33,
"end": 41,
"ctxt": 0
},
"params": [
{
"type": "TsKeywordType",
"span": {
"start": 34,
"end": 40,
"ctxt": 0
},
"kind": "number"
}
]
}
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "ForOfStatement",
"span": {
"start": 43,
"end": 68,
"ctxt": 0
},
"await": null,
"left": {
"type": "VariableDeclaration",
"span": {
"start": 48,
"end": 55,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 52,
"end": 55,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 52,
"end": 55,
"ctxt": 0
},
"value": "num",
"optional": false,
"typeAnnotation": null
},
"init": null,
"definite": false
}
]
},
"right": {
"type": "Identifier",
"span": {
"start": 59,
"end": 63,
"ctxt": 0
},
"value": "iter",
"optional": false
},
"body": {
"type": "BlockStatement",
"span": {
"start": 65,
"end": 68,
"ctxt": 0
},
"stmts": []
}
}
],
"interpreter": null
}