Debian Codegraph @

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

raw
1 {
2 "type": "File",
3 "start":0,"end":55,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":55}},
4 "errors": [
5 "SyntaxError: Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions. (2:16)"
6 ],
7 "program": {
8 "type": "Program",
9 "start":0,"end":55,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":55}},
10 "sourceType": "module",
11 "interpreter": null,
12 "body": [
13 {
14 "type": "DeclareClass",
15 "start":0,"end":55,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":55}},
16 "id": {
17 "type": "Identifier",
18 "start":14,"end":15,"loc":{"start":{"line":1,"column":14,"index":14},"end":{"line":1,"column":15,"index":15},"identifierName":"A"},
19 "name": "A"
20 },
21 "typeParameters": null,
22 "extends": [],
23 "implements": [],
24 "mixins": [],
25 "body": {
26 "type": "ObjectTypeAnnotation",
27 "start":16,"end":55,"loc":{"start":{"line":1,"column":16,"index":16},"end":{"line":3,"column":1,"index":55}},
28 "callProperties": [],
29 "properties": [
30 {
31 "type": "ObjectTypeProperty",
32 "start":22,"end":52,"loc":{"start":{"line":2,"column":4,"index":22},"end":{"line":2,"column":34,"index":52}},
33 "key": {
34 "type": "Identifier",
35 "start":22,"end":33,"loc":{"start":{"line":2,"column":4,"index":22},"end":{"line":2,"column":15,"index":33},"identifierName":"constructor"},
36 "name": "constructor"
37 },
38 "static": false,
39 "proto": false,
40 "kind": "init",
41 "method": true,
42 "value": {
43 "type": "FunctionTypeAnnotation",
44 "start":22,"end":52,"loc":{"start":{"line":2,"column":4,"index":22},"end":{"line":2,"column":34,"index":52}},
45 "params": [],
46 "rest": null,
47 "typeParameters": null,
48 "this": {
49 "type": "FunctionTypeParam",
50 "start":34,"end":47,"loc":{"start":{"line":2,"column":16,"index":34},"end":{"line":2,"column":29,"index":47}},
51 "name": null,
52 "optional": false,
53 "typeAnnotation": {
54 "type": "NumberTypeAnnotation",
55 "start":41,"end":47,"loc":{"start":{"line":2,"column":23,"index":41},"end":{"line":2,"column":29,"index":47}}
56 }
57 },
58 "returnType": {
59 "type": "GenericTypeAnnotation",
60 "start":51,"end":52,"loc":{"start":{"line":2,"column":33,"index":51},"end":{"line":2,"column":34,"index":52}},
61 "typeParameters": null,
62 "id": {
63 "type": "Identifier",
64 "start":51,"end":52,"loc":{"start":{"line":2,"column":33,"index":51},"end":{"line":2,"column":34,"index":52},"identifierName":"A"},
65 "name": "A"
66 }
67 }
68 },
69 "optional": false
70 }
71 ],
72 "indexers": [],
73 "internalSlots": [],
74 "exact": false
75 }
76 }
77 ],
78 "directives": []
79 }
80 }