{ "type": "Script", "span": { "start": 15, "end": 291, "ctxt": 0 }, "body": [ { "type": "ClassDeclaration", "identifier": { "type": "Identifier", "span": { "start": 21, "end": 24, "ctxt": 0 }, "value": "Bar", "optional": false }, "declare": false, "span": { "start": 15, "end": 30, "ctxt": 0 }, "decorators": [], "body": [ { "type": "ClassProperty", "span": { "start": 27, "end": 28, "ctxt": 0 }, "key": { "type": "Identifier", "span": { "start": 27, "end": 28, "ctxt": 0 }, "value": "x", "optional": false }, "value": null, "typeAnnotation": null, "isStatic": false, "decorators": [], "accessibility": null, "isAbstract": false, "isOptional": false, "isOverride": false, "readonly": false, "declare": false, "definite": false } ], "superClass": null, "isAbstract": false, "typeParams": null, "superTypeParams": null, "implements": [] }, { "type": "ClassDeclaration", "identifier": { "type": "Identifier", "span": { "start": 37, "end": 40, "ctxt": 0 }, "value": "Foo", "optional": false }, "declare": false, "span": { "start": 31, "end": 58, "ctxt": 0 }, "decorators": [], "body": [ { "type": "ClassProperty", "span": { "start": 55, "end": 56, "ctxt": 0 }, "key": { "type": "Identifier", "span": { "start": 55, "end": 56, "ctxt": 0 }, "value": "y", "optional": false }, "value": null, "typeAnnotation": null, "isStatic": false, "decorators": [], "accessibility": null, "isAbstract": false, "isOptional": false, "isOverride": false, "readonly": false, "declare": false, "definite": false } ], "superClass": { "type": "Identifier", "span": { "start": 49, "end": 52, "ctxt": 0 }, "value": "Bar", "optional": false }, "isAbstract": false, "typeParams": null, "superTypeParams": null, "implements": [] }, { "type": "ClassDeclaration", "identifier": { "type": "Identifier", "span": { "start": 65, "end": 76, "ctxt": 0 }, "value": "FooIterator", "optional": false }, "declare": false, "span": { "start": 59, "end": 233, "ctxt": 0 }, "decorators": [], "body": [ { "type": "ClassMethod", "span": { "start": 83, "end": 177, "ctxt": 0 }, "key": { "type": "Identifier", "span": { "start": 83, "end": 87, "ctxt": 0 }, "value": "next", "optional": false }, "function": { "params": [], "decorators": [], "span": { "start": 83, "end": 177, "ctxt": 0 }, "body": { "type": "BlockStatement", "span": { "start": 90, "end": 177, "ctxt": 0 }, "stmts": [ { "type": "ReturnStatement", "span": { "start": 100, "end": 171, "ctxt": 0 }, "argument": { "type": "ObjectExpression", "span": { "start": 107, "end": 170, "ctxt": 0 }, "properties": [ { "type": "KeyValueProperty", "key": { "type": "Identifier", "span": { "start": 121, "end": 126, "ctxt": 0 }, "value": "value", "optional": false }, "value": { "type": "NewExpression", "span": { "start": 128, "end": 135, "ctxt": 0 }, "callee": { "type": "Identifier", "span": { "start": 132, "end": 135, "ctxt": 0 }, "value": "Foo", "optional": false }, "arguments": null, "typeArguments": null } }, { "type": "KeyValueProperty", "key": { "type": "Identifier", "span": { "start": 149, "end": 153, "ctxt": 0 }, "value": "done", "optional": false }, "value": { "type": "BooleanLiteral", "span": { "start": 155, "end": 160, "ctxt": 0 }, "value": false } } ] } } ] }, "generator": false, "async": false, "typeParameters": null, "returnType": null }, "kind": "method", "isStatic": false, "accessibility": null, "isAbstract": false, "isOptional": false, "isOverride": false }, { "type": "ClassMethod", "span": { "start": 183, "end": 231, "ctxt": 0 }, "key": { "type": "Computed", "span": { "start": 183, "end": 200, "ctxt": 0 }, "expression": { "type": "MemberExpression", "span": { "start": 184, "end": 199, "ctxt": 0 }, "object": { "type": "Identifier", "span": { "start": 184, "end": 190, "ctxt": 0 }, "value": "Symbol", "optional": false }, "property": { "type": "Identifier", "span": { "start": 191, "end": 199, "ctxt": 0 }, "value": "iterator", "optional": false } } }, "function": { "params": [], "decorators": [], "span": { "start": 183, "end": 231, "ctxt": 0 }, "body": { "type": "BlockStatement", "span": { "start": 203, "end": 231, "ctxt": 0 }, "stmts": [ { "type": "ReturnStatement", "span": { "start": 213, "end": 225, "ctxt": 0 }, "argument": { "type": "ThisExpression", "span": { "start": 220, "end": 224, "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": "FunctionDeclaration", "identifier": { "type": "Identifier", "span": { "start": 244, "end": 247, "ctxt": 0 }, "value": "fun", "optional": false }, "declare": false, "params": [ { "type": "Parameter", "span": { "start": 248, "end": 264, "ctxt": 0 }, "decorators": [], "pat": { "type": "RestElement", "span": { "start": 248, "end": 264, "ctxt": 0 }, "rest": { "start": 248, "end": 251, "ctxt": 0 }, "argument": { "type": "ArrayPattern", "span": { "start": 251, "end": 257, "ctxt": 0 }, "elements": [ { "type": "Identifier", "span": { "start": 252, "end": 253, "ctxt": 0 }, "value": "a", "optional": false, "typeAnnotation": null }, { "type": "Identifier", "span": { "start": 255, "end": 256, "ctxt": 0 }, "value": "b", "optional": false, "typeAnnotation": null } ], "optional": false, "typeAnnotation": null }, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 257, "end": 264, "ctxt": 0 }, "typeAnnotation": { "type": "TsArrayType", "span": { "start": 259, "end": 264, "ctxt": 0 }, "elemType": { "type": "TsTypeReference", "span": { "start": 259, "end": 262, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 259, "end": 262, "ctxt": 0 }, "value": "Bar", "optional": false }, "typeParams": null } } } } } ], "decorators": [], "span": { "start": 235, "end": 269, "ctxt": 0 }, "body": { "type": "BlockStatement", "span": { "start": 266, "end": 269, "ctxt": 0 }, "stmts": [] }, "generator": false, "async": false, "typeParameters": null, "returnType": null }, { "type": "ExpressionStatement", "span": { "start": 270, "end": 291, "ctxt": 0 }, "expression": { "type": "CallExpression", "span": { "start": 270, "end": 290, "ctxt": 0 }, "callee": { "type": "Identifier", "span": { "start": 270, "end": 273, "ctxt": 0 }, "value": "fun", "optional": false }, "arguments": [ { "spread": null, "expression": { "type": "NewExpression", "span": { "start": 274, "end": 289, "ctxt": 0 }, "callee": { "type": "Identifier", "span": { "start": 278, "end": 289, "ctxt": 0 }, "value": "FooIterator", "optional": false }, "arguments": null, "typeArguments": null } } ], "typeArguments": null } } ], "interpreter": null }