Debian Codegraph @

packages/babel-parser/test/fixtures/flow/regression/issue-336/output.json

raw
1 {
2 "type": "File",
3 "start":0,"end":48,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":48,"index":48}},
4 "program": {
5 "type": "Program",
6 "start":0,"end":48,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":48,"index":48}},
7 "sourceType": "module",
8 "interpreter": null,
9 "body": [
10 {
11 "type": "VariableDeclaration",
12 "start":0,"end":48,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":48,"index":48}},
13 "declarations": [
14 {
15 "type": "VariableDeclarator",
16 "start":6,"end":47,"loc":{"start":{"line":1,"column":6,"index":6},"end":{"line":1,"column":47,"index":47}},
17 "id": {
18 "type": "Identifier",
19 "start":6,"end":8,"loc":{"start":{"line":1,"column":6,"index":6},"end":{"line":1,"column":8,"index":8},"identifierName":"fn"},
20 "name": "fn"
21 },
22 "init": {
23 "type": "ArrowFunctionExpression",
24 "start":11,"end":47,"loc":{"start":{"line":1,"column":11,"index":11},"end":{"line":1,"column":47,"index":47}},
25 "returnType": {
26 "type": "TypeAnnotation",
27 "start":26,"end":41,"loc":{"start":{"line":1,"column":26,"index":26},"end":{"line":1,"column":41,"index":41}},
28 "typeAnnotation": {
29 "type": "GenericTypeAnnotation",
30 "start":28,"end":41,"loc":{"start":{"line":1,"column":28,"index":28},"end":{"line":1,"column":41,"index":41}},
31 "typeParameters": {
32 "type": "TypeParameterInstantiation",
33 "start":35,"end":41,"loc":{"start":{"line":1,"column":35,"index":35},"end":{"line":1,"column":41,"index":41}},
34 "params": [
35 {
36 "type": "VoidTypeAnnotation",
37 "start":36,"end":40,"loc":{"start":{"line":1,"column":36,"index":36},"end":{"line":1,"column":40,"index":40}}
38 }
39 ]
40 },
41 "id": {
42 "type": "Identifier",
43 "start":28,"end":35,"loc":{"start":{"line":1,"column":28,"index":28},"end":{"line":1,"column":35,"index":35},"identifierName":"Promise"},
44 "name": "Promise"
45 }
46 }
47 },
48 "id": null,
49 "generator": false,
50 "async": true,
51 "params": [
52 {
53 "type": "Identifier",
54 "start":18,"end":25,"loc":{"start":{"line":1,"column":18,"index":18},"end":{"line":1,"column":25,"index":25},"identifierName":"a"},
55 "name": "a",
56 "optional": true,
57 "typeAnnotation": {
58 "type": "TypeAnnotation",
59 "start":20,"end":25,"loc":{"start":{"line":1,"column":20,"index":20},"end":{"line":1,"column":25,"index":25}},
60 "typeAnnotation": {
61 "type": "AnyTypeAnnotation",
62 "start":22,"end":25,"loc":{"start":{"line":1,"column":22,"index":22},"end":{"line":1,"column":25,"index":25}}
63 }
64 }
65 }
66 ],
67 "body": {
68 "type": "BlockStatement",
69 "start":45,"end":47,"loc":{"start":{"line":1,"column":45,"index":45},"end":{"line":1,"column":47,"index":47}},
70 "body": [],
71 "directives": []
72 }
73 }
74 }
75 ],
76 "kind": "const"
77 }
78 ],
79 "directives": []
80 }
81 }