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

150 lines
3.3 KiB
JSON

{
"type": "Script",
"span": {
"start": 16,
"end": 69,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 16,
"end": 43,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 20,
"end": 42,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 20,
"end": 24,
"ctxt": 0
},
"value": "iter",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 24,
"end": 42,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 26,
"end": 42,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 26,
"end": 34,
"ctxt": 0
},
"value": "Iterable",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 34,
"end": 42,
"ctxt": 0
},
"params": [
{
"type": "TsKeywordType",
"span": {
"start": 35,
"end": 41,
"ctxt": 0
},
"kind": "number"
}
]
}
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "ForOfStatement",
"span": {
"start": 44,
"end": 69,
"ctxt": 0
},
"await": null,
"left": {
"type": "VariableDeclaration",
"span": {
"start": 49,
"end": 56,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 53,
"end": 56,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 53,
"end": 56,
"ctxt": 0
},
"value": "num",
"optional": false,
"typeAnnotation": null
},
"init": null,
"definite": false
}
]
},
"right": {
"type": "Identifier",
"span": {
"start": 60,
"end": 64,
"ctxt": 0
},
"value": "iter",
"optional": false
},
"body": {
"type": "BlockStatement",
"span": {
"start": 66,
"end": 69,
"ctxt": 0
},
"stmts": []
}
}
],
"interpreter": null
}