{ "type": "Script", "span": { "start": 15, "end": 304, "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": 81, "ctxt": 0 }, "value": "FooArrayIterator", "optional": false }, "declare": false, "span": { "start": 59, "end": 240, "ctxt": 0 }, "decorators": [], "body": [ { "type": "ClassMethod", "span": { "start": 88, "end": 184, "ctxt": 0 }, "key": { "type": "Identifier", "span": { "start": 88, "end": 92, "ctxt": 0 }, "value": "next", "optional": false }, "function": { "params": [], "decorators": [], "span": { "start": 88, "end": 184, "ctxt": 0 }, "body": { "type": "BlockStatement", "span": { "start": 95, "end": 184, "ctxt": 0 }, "stmts": [ { "type": "ReturnStatement", "span": { "start": 105, "end": 178, "ctxt": 0 }, "argument": { "type": "ObjectExpression", "span": { "start": 112, "end": 177, "ctxt": 0 }, "properties": [ { "type": "KeyValueProperty", "key": { "type": "Identifier", "span": { "start": 126, "end": 131, "ctxt": 0 }, "value": "value", "optional": false }, "value": { "type": "ArrayExpression", "span": { "start": 133, "end": 142, "ctxt": 0 }, "elements": [ { "spread": null, "expression": { "type": "NewExpression", "span": { "start": 134, "end": 141, "ctxt": 0 }, "callee": { "type": "Identifier", "span": { "start": 138, "end": 141, "ctxt": 0 }, "value": "Foo", "optional": false }, "arguments": null, "typeArguments": null } } ] } }, { "type": "KeyValueProperty", "key": { "type": "Identifier", "span": { "start": 156, "end": 160, "ctxt": 0 }, "value": "done", "optional": false }, "value": { "type": "BooleanLiteral", "span": { "start": 162, "end": 167, "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": 190, "end": 238, "ctxt": 0 }, "key": { "type": "Computed", "span": { "start": 190, "end": 207, "ctxt": 0 }, "expression": { "type": "MemberExpression", "span": { "start": 191, "end": 206, "ctxt": 0 }, "object": { "type": "Identifier", "span": { "start": 191, "end": 197, "ctxt": 0 }, "value": "Symbol", "optional": false }, "property": { "type": "Identifier", "span": { "start": 198, "end": 206, "ctxt": 0 }, "value": "iterator", "optional": false } } }, "function": { "params": [], "decorators": [], "span": { "start": 190, "end": 238, "ctxt": 0 }, "body": { "type": "BlockStatement", "span": { "start": 210, "end": 238, "ctxt": 0 }, "stmts": [ { "type": "ReturnStatement", "span": { "start": 220, "end": 232, "ctxt": 0 }, "argument": { "type": "ThisExpression", "span": { "start": 227, "end": 231, "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": 251, "end": 254, "ctxt": 0 }, "value": "fun", "optional": false }, "declare": false, "params": [ { "type": "Parameter", "span": { "start": 255, "end": 272, "ctxt": 0 }, "decorators": [], "pat": { "type": "ArrayPattern", "span": { "start": 255, "end": 272, "ctxt": 0 }, "elements": [ { "type": "ArrayPattern", "span": { "start": 256, "end": 259, "ctxt": 0 }, "elements": [ { "type": "Identifier", "span": { "start": 257, "end": 258, "ctxt": 0 }, "value": "a", "optional": false, "typeAnnotation": null } ], "optional": false, "typeAnnotation": null }, { "type": "Identifier", "span": { "start": 261, "end": 262, "ctxt": 0 }, "value": "b", "optional": false, "typeAnnotation": null } ], "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 263, "end": 272, "ctxt": 0 }, "typeAnnotation": { "type": "TsArrayType", "span": { "start": 265, "end": 272, "ctxt": 0 }, "elemType": { "type": "TsArrayType", "span": { "start": 265, "end": 270, "ctxt": 0 }, "elemType": { "type": "TsTypeReference", "span": { "start": 265, "end": 268, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 265, "end": 268, "ctxt": 0 }, "value": "Bar", "optional": false }, "typeParams": null } } } } } } ], "decorators": [], "span": { "start": 242, "end": 277, "ctxt": 0 }, "body": { "type": "BlockStatement", "span": { "start": 274, "end": 277, "ctxt": 0 }, "stmts": [] }, "generator": false, "async": false, "typeParameters": null, "returnType": null }, { "type": "ExpressionStatement", "span": { "start": 278, "end": 304, "ctxt": 0 }, "expression": { "type": "CallExpression", "span": { "start": 278, "end": 303, "ctxt": 0 }, "callee": { "type": "Identifier", "span": { "start": 278, "end": 281, "ctxt": 0 }, "value": "fun", "optional": false }, "arguments": [ { "spread": null, "expression": { "type": "NewExpression", "span": { "start": 282, "end": 302, "ctxt": 0 }, "callee": { "type": "Identifier", "span": { "start": 286, "end": 302, "ctxt": 0 }, "value": "FooArrayIterator", "optional": false }, "arguments": null, "typeArguments": null } } ], "typeArguments": null } } ], "interpreter": null }