Debian Codegraph @

packages/babel-parser/test/fixtures/flow/declare-export/export-function/output.json

raw
1 {
2 "type": "File",
3 "start":0,"end":73,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":73,"index":73}},
4 "program": {
5 "type": "Program",
6 "start":0,"end":73,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":73,"index":73}},
7 "sourceType": "module",
8 "interpreter": null,
9 "body": [
10 {
11 "type": "DeclareModule",
12 "start":0,"end":73,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":73,"index":73}},
13 "id": {
14 "type": "StringLiteral",
15 "start":15,"end":20,"loc":{"start":{"line":1,"column":15,"index":15},"end":{"line":1,"column":20,"index":20}},
16 "extra": {
17 "rawValue": "foo",
18 "raw": "\"foo\""
19 },
20 "value": "foo"
21 },
22 "body": {
23 "type": "BlockStatement",
24 "start":21,"end":73,"loc":{"start":{"line":1,"column":21,"index":21},"end":{"line":1,"column":73,"index":73}},
25 "body": [
26 {
27 "type": "DeclareExportDeclaration",
28 "start":23,"end":71,"loc":{"start":{"line":1,"column":23,"index":23},"end":{"line":1,"column":71,"index":71}},
29 "declaration": {
30 "type": "DeclareFunction",
31 "start":38,"end":71,"loc":{"start":{"line":1,"column":38,"index":38},"end":{"line":1,"column":71,"index":71}},
32 "id": {
33 "type": "Identifier",
34 "start":47,"end":70,"loc":{"start":{"line":1,"column":47,"index":47},"end":{"line":1,"column":70,"index":70},"identifierName":"bar"},
35 "name": "bar",
36 "typeAnnotation": {
37 "type": "TypeAnnotation",
38 "start":50,"end":70,"loc":{"start":{"line":1,"column":50,"index":50},"end":{"line":1,"column":70,"index":70}},
39 "typeAnnotation": {
40 "type": "FunctionTypeAnnotation",
41 "start":50,"end":70,"loc":{"start":{"line":1,"column":50,"index":50},"end":{"line":1,"column":70,"index":70}},
42 "typeParameters": null,
43 "params": [
44 {
45 "type": "FunctionTypeParam",
46 "start":51,"end":61,"loc":{"start":{"line":1,"column":51,"index":51},"end":{"line":1,"column":61,"index":61}},
47 "name": {
48 "type": "Identifier",
49 "start":51,"end":53,"loc":{"start":{"line":1,"column":51,"index":51},"end":{"line":1,"column":53,"index":53},"identifierName":"p1"},
50 "name": "p1"
51 },
52 "optional": false,
53 "typeAnnotation": {
54 "type": "NumberTypeAnnotation",
55 "start":55,"end":61,"loc":{"start":{"line":1,"column":55,"index":55},"end":{"line":1,"column":61,"index":61}}
56 }
57 }
58 ],
59 "rest": null,
60 "this": null,
61 "returnType": {
62 "type": "StringTypeAnnotation",
63 "start":64,"end":70,"loc":{"start":{"line":1,"column":64,"index":64},"end":{"line":1,"column":70,"index":70}}
64 }
65 }
66 }
67 },
68 "predicate": null
69 },
70 "default": false
71 }
72 ]
73 },
74 "kind": "ES"
75 }
76 ],
77 "directives": []
78 }
79 }