Debian Codegraph @

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

raw
1 {
2 "type": "File",
3 "start":0,"end":31,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":31,"index":31}},
4 "errors": [
5 "SyntaxError: The `this` parameter cannot be optional. (1:13)"
6 ],
7 "program": {
8 "type": "Program",
9 "start":0,"end":31,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":31,"index":31}},
10 "sourceType": "module",
11 "interpreter": null,
12 "body": [
13 {
14 "type": "FunctionDeclaration",
15 "start":0,"end":31,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":31,"index":31}},
16 "id": {
17 "type": "Identifier",
18 "start":9,"end":12,"loc":{"start":{"line":1,"column":9,"index":9},"end":{"line":1,"column":12,"index":12},"identifierName":"foo"},
19 "name": "foo"
20 },
21 "generator": false,
22 "async": false,
23 "params": [
24 {
25 "type": "Identifier",
26 "start":13,"end":27,"loc":{"start":{"line":1,"column":13,"index":13},"end":{"line":1,"column":27,"index":27},"identifierName":"this"},
27 "name": "this",
28 "optional": true,
29 "typeAnnotation": {
30 "type": "TypeAnnotation",
31 "start":19,"end":27,"loc":{"start":{"line":1,"column":19,"index":19},"end":{"line":1,"column":27,"index":27}},
32 "typeAnnotation": {
33 "type": "NumberTypeAnnotation",
34 "start":21,"end":27,"loc":{"start":{"line":1,"column":21,"index":21},"end":{"line":1,"column":27,"index":27}}
35 }
36 }
37 }
38 ],
39 "body": {
40 "type": "BlockStatement",
41 "start":29,"end":31,"loc":{"start":{"line":1,"column":29,"index":29},"end":{"line":1,"column":31,"index":31}},
42 "body": [],
43 "directives": []
44 }
45 }
46 ],
47 "directives": []
48 }
49 }