Debian Codegraph @

packages/babel-parser/test/fixtures/flow/declare-module/invalid-es-module/output.json

raw
1 {
2 "type": "File",
3 "start":0,"end":86,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":86,"index":86}},
4 "errors": [
5 "SyntaxError: Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module. (1:53)"
6 ],
7 "program": {
8 "type": "Program",
9 "start":0,"end":86,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":86,"index":86}},
10 "sourceType": "module",
11 "interpreter": null,
12 "body": [
13 {
14 "type": "DeclareModule",
15 "start":0,"end":86,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":86,"index":86}},
16 "id": {
17 "type": "StringLiteral",
18 "start":15,"end":20,"loc":{"start":{"line":1,"column":15,"index":15},"end":{"line":1,"column":20,"index":20}},
19 "extra": {
20 "rawValue": "foo",
21 "raw": "\"foo\""
22 },
23 "value": "foo"
24 },
25 "body": {
26 "type": "BlockStatement",
27 "start":21,"end":86,"loc":{"start":{"line":1,"column":21,"index":21},"end":{"line":1,"column":86,"index":86}},
28 "body": [
29 {
30 "type": "DeclareExportDeclaration",
31 "start":23,"end":52,"loc":{"start":{"line":1,"column":23,"index":23},"end":{"line":1,"column":52,"index":52}},
32 "declaration": {
33 "type": "DeclareVariable",
34 "start":38,"end":52,"loc":{"start":{"line":1,"column":38,"index":38},"end":{"line":1,"column":52,"index":52}},
35 "id": {
36 "type": "Identifier",
37 "start":42,"end":51,"loc":{"start":{"line":1,"column":42,"index":42},"end":{"line":1,"column":51,"index":51},"identifierName":"a"},
38 "name": "a",
39 "typeAnnotation": {
40 "type": "TypeAnnotation",
41 "start":43,"end":51,"loc":{"start":{"line":1,"column":43,"index":43},"end":{"line":1,"column":51,"index":51}},
42 "typeAnnotation": {
43 "type": "NumberTypeAnnotation",
44 "start":45,"end":51,"loc":{"start":{"line":1,"column":45,"index":45},"end":{"line":1,"column":51,"index":51}}
45 }
46 }
47 }
48 },
49 "default": false
50 },
51 {
52 "type": "DeclareModuleExports",
53 "start":53,"end":84,"loc":{"start":{"line":1,"column":53,"index":53},"end":{"line":1,"column":84,"index":84}},
54 "typeAnnotation": {
55 "type": "TypeAnnotation",
56 "start":75,"end":83,"loc":{"start":{"line":1,"column":75,"index":75},"end":{"line":1,"column":83,"index":83}},
57 "typeAnnotation": {
58 "type": "NumberTypeAnnotation",
59 "start":77,"end":83,"loc":{"start":{"line":1,"column":77,"index":77},"end":{"line":1,"column":83,"index":83}}
60 }
61 }
62 }
63 ]
64 },
65 "kind": "CommonJS"
66 }
67 ],
68 "directives": []
69 }
70 }