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

209 lines
5.6 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 15,
"end": 145,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 15,
"end": 96,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 19,
"end": 95,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 19,
"end": 47,
"ctxt": 0
},
"value": "iterableWithOptionalIterator",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 47,
"end": 95,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 49,
"end": 95,
"ctxt": 0
},
"members": [
{
"type": "TsMethodSignature",
"span": {
"start": 55,
"end": 93,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "MemberExpression",
"span": {
"start": 56,
"end": 71,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 56,
"end": 62,
"ctxt": 0
},
"value": "Symbol",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 63,
"end": 71,
"ctxt": 0
},
"value": "iterator",
"optional": false
}
},
"computed": true,
"optional": true,
"params": [],
"typeAnn": {
"type": "TsTypeAnnotation",
"span": {
"start": 75,
"end": 93,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 77,
"end": 93,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 77,
"end": 85,
"ctxt": 0
},
"value": "Iterator",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 85,
"end": 93,
"ctxt": 0
},
"params": [
{
"type": "TsKeywordType",
"span": {
"start": 86,
"end": 92,
"ctxt": 0
},
"kind": "string"
}
]
}
}
},
"typeParams": null
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "ForOfStatement",
"span": {
"start": 98,
"end": 145,
"ctxt": 0
},
"await": null,
"left": {
"type": "VariableDeclaration",
"span": {
"start": 103,
"end": 108,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 107,
"end": 108,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 107,
"end": 108,
"ctxt": 0
},
"value": "v",
"optional": false,
"typeAnnotation": null
},
"init": null,
"definite": false
}
]
},
"right": {
"type": "Identifier",
"span": {
"start": 112,
"end": 140,
"ctxt": 0
},
"value": "iterableWithOptionalIterator",
"optional": false
},
"body": {
"type": "BlockStatement",
"span": {
"start": 142,
"end": 145,
"ctxt": 0
},
"stmts": []
}
}
],
"interpreter": null
}