swc/crates/swc_ecma_parser/tests/tsc/for-of29.json
2023-03-12 04:50:28 +00:00

209 lines
5.6 KiB
JSON

{
"type": "Script",
"span": {
"start": 16,
"end": 146,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 16,
"end": 97,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 20,
"end": 96,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 20,
"end": 48,
"ctxt": 0
},
"value": "iterableWithOptionalIterator",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 48,
"end": 96,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 50,
"end": 96,
"ctxt": 0
},
"members": [
{
"type": "TsMethodSignature",
"span": {
"start": 56,
"end": 94,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "MemberExpression",
"span": {
"start": 57,
"end": 72,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 57,
"end": 63,
"ctxt": 0
},
"value": "Symbol",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 64,
"end": 72,
"ctxt": 0
},
"value": "iterator",
"optional": false
}
},
"computed": true,
"optional": true,
"params": [],
"typeAnn": {
"type": "TsTypeAnnotation",
"span": {
"start": 76,
"end": 94,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 78,
"end": 94,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 78,
"end": 86,
"ctxt": 0
},
"value": "Iterator",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 86,
"end": 94,
"ctxt": 0
},
"params": [
{
"type": "TsKeywordType",
"span": {
"start": 87,
"end": 93,
"ctxt": 0
},
"kind": "string"
}
]
}
}
},
"typeParams": null
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "ForOfStatement",
"span": {
"start": 99,
"end": 146,
"ctxt": 0
},
"await": false,
"left": {
"type": "VariableDeclaration",
"span": {
"start": 104,
"end": 109,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 108,
"end": 109,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 108,
"end": 109,
"ctxt": 0
},
"value": "v",
"optional": false,
"typeAnnotation": null
},
"init": null,
"definite": false
}
]
},
"right": {
"type": "Identifier",
"span": {
"start": 113,
"end": 141,
"ctxt": 0
},
"value": "iterableWithOptionalIterator",
"optional": false
},
"body": {
"type": "BlockStatement",
"span": {
"start": 143,
"end": 146,
"ctxt": 0
},
"stmts": []
}
}
],
"interpreter": null
}