Debian Codegraph @

packages/babel-parser/test/fixtures/flow/this-annotation/this-getter/output.json

raw
1 {
2 "type": "File",
3 "start":0,"end":40,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":40}},
4 "errors": [
5 "SyntaxError: A 'get' accessor must not have any formal parameters. (2:2)",
6 "SyntaxError: A getter cannot have a `this` parameter. (2:10)"
7 ],
8 "program": {
9 "type": "Program",
10 "start":0,"end":40,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":40}},
11 "sourceType": "module",
12 "interpreter": null,
13 "body": [
14 {
15 "type": "ClassDeclaration",
16 "start":0,"end":40,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":40}},
17 "id": {
18 "type": "Identifier",
19 "start":6,"end":9,"loc":{"start":{"line":1,"column":6,"index":6},"end":{"line":1,"column":9,"index":9},"identifierName":"Foo"},
20 "name": "Foo"
21 },
22 "superClass": null,
23 "body": {
24 "type": "ClassBody",
25 "start":10,"end":40,"loc":{"start":{"line":1,"column":10,"index":10},"end":{"line":3,"column":1,"index":40}},
26 "body": [
27 {
28 "type": "ClassMethod",
29 "start":14,"end":38,"loc":{"start":{"line":2,"column":2,"index":14},"end":{"line":2,"column":26,"index":38}},
30 "static": false,
31 "key": {
32 "type": "Identifier",
33 "start":18,"end":21,"loc":{"start":{"line":2,"column":6,"index":18},"end":{"line":2,"column":9,"index":21},"identifierName":"foo"},
34 "name": "foo"
35 },
36 "computed": false,
37 "kind": "get",
38 "id": null,
39 "generator": false,
40 "async": false,
41 "params": [
42 {
43 "type": "Identifier",
44 "start":22,"end":34,"loc":{"start":{"line":2,"column":10,"index":22},"end":{"line":2,"column":22,"index":34},"identifierName":"this"},
45 "name": "this",
46 "typeAnnotation": {
47 "type": "TypeAnnotation",
48 "start":26,"end":34,"loc":{"start":{"line":2,"column":14,"index":26},"end":{"line":2,"column":22,"index":34}},
49 "typeAnnotation": {
50 "type": "StringTypeAnnotation",
51 "start":28,"end":34,"loc":{"start":{"line":2,"column":16,"index":28},"end":{"line":2,"column":22,"index":34}}
52 }
53 }
54 }
55 ],
56 "body": {
57 "type": "BlockStatement",
58 "start":36,"end":38,"loc":{"start":{"line":2,"column":24,"index":36},"end":{"line":2,"column":26,"index":38}},
59 "body": [],
60 "directives": []
61 }
62 }
63 ]
64 }
65 }
66 ],
67 "directives": []
68 }
69 }