Debian Codegraph @

packages/babel-parser/test/fixtures/flow/class-properties/declare-field-initializer/output.json

raw
1 {
2 "type": "File",
3 "start":0,"end":29,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":29}},
4 "errors": [
5 "SyntaxError: Initializers are not allowed in fields with the `declare` modifier. (2:16)"
6 ],
7 "program": {
8 "type": "Program",
9 "start":0,"end":29,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":29}},
10 "sourceType": "module",
11 "interpreter": null,
12 "body": [
13 {
14 "type": "ClassDeclaration",
15 "start":0,"end":29,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":29}},
16 "id": {
17 "type": "Identifier",
18 "start":6,"end":7,"loc":{"start":{"line":1,"column":6,"index":6},"end":{"line":1,"column":7,"index":7},"identifierName":"A"},
19 "name": "A"
20 },
21 "superClass": null,
22 "body": {
23 "type": "ClassBody",
24 "start":8,"end":29,"loc":{"start":{"line":1,"column":8,"index":8},"end":{"line":3,"column":1,"index":29}},
25 "body": [
26 {
27 "type": "ClassProperty",
28 "start":12,"end":27,"loc":{"start":{"line":2,"column":2,"index":12},"end":{"line":2,"column":17,"index":27}},
29 "declare": true,
30 "static": false,
31 "variance": null,
32 "key": {
33 "type": "Identifier",
34 "start":20,"end":23,"loc":{"start":{"line":2,"column":10,"index":20},"end":{"line":2,"column":13,"index":23},"identifierName":"foo"},
35 "name": "foo"
36 },
37 "computed": false,
38 "value": {
39 "type": "NumericLiteral",
40 "start":26,"end":27,"loc":{"start":{"line":2,"column":16,"index":26},"end":{"line":2,"column":17,"index":27}},
41 "extra": {
42 "rawValue": 2,
43 "raw": "2"
44 },
45 "value": 2
46 }
47 }
48 ]
49 }
50 }
51 ],
52 "directives": []
53 }
54 }