swc/crates/swc_ecma_parser/tests/tsc/iteratorSpreadInArray9.json

295 lines
7.5 KiB
JSON

{
"type": "Script",
"span": {
"start": 15,
"end": 206,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 21,
"end": 35,
"ctxt": 0
},
"value": "SymbolIterator",
"optional": false
},
"declare": false,
"span": {
"start": 15,
"end": 168,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 42,
"end": 112,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 42,
"end": 46,
"ctxt": 0
},
"value": "next",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 42,
"end": 112,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 49,
"end": 112,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 59,
"end": 106,
"ctxt": 0
},
"argument": {
"type": "ObjectExpression",
"span": {
"start": 66,
"end": 105,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 80,
"end": 85,
"ctxt": 0
},
"value": "value",
"optional": false
},
"value": {
"type": "CallExpression",
"span": {
"start": 87,
"end": 95,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 87,
"end": 93,
"ctxt": 0
},
"value": "Symbol",
"optional": false
},
"arguments": [],
"typeArguments": null
}
}
]
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
},
{
"type": "ClassMethod",
"span": {
"start": 118,
"end": 166,
"ctxt": 0
},
"key": {
"type": "Computed",
"span": {
"start": 118,
"end": 135,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 119,
"end": 134,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 119,
"end": 125,
"ctxt": 0
},
"value": "Symbol",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 126,
"end": 134,
"ctxt": 0
},
"value": "iterator",
"optional": false
}
}
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 118,
"end": 166,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 138,
"end": 166,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 148,
"end": 160,
"ctxt": 0
},
"argument": {
"type": "ThisExpression",
"span": {
"start": 155,
"end": 159,
"ctxt": 0
}
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "VariableDeclaration",
"span": {
"start": 170,
"end": 206,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 174,
"end": 205,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 174,
"end": 179,
"ctxt": 0
},
"value": "array",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ArrayExpression",
"span": {
"start": 182,
"end": 205,
"ctxt": 0
},
"elements": [
{
"spread": {
"start": 183,
"end": 186,
"ctxt": 0
},
"expression": {
"type": "NewExpression",
"span": {
"start": 186,
"end": 204,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 190,
"end": 204,
"ctxt": 0
},
"value": "SymbolIterator",
"optional": false
},
"arguments": null,
"typeArguments": null
}
}
]
},
"definite": false
}
]
}
],
"interpreter": null
}