Debian Codegraph @

packages/babel-parser/test/fixtures/flow/predicates/2/output.json

raw
1 {
2 "type": "File",
3 "start":0,"end":53,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":53,"index":53}},
4 "program": {
5 "type": "Program",
6 "start":0,"end":53,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":53,"index":53}},
7 "sourceType": "module",
8 "interpreter": null,
9 "body": [
10 {
11 "type": "VariableDeclaration",
12 "start":0,"end":53,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":53,"index":53}},
13 "declarations": [
14 {
15 "type": "VariableDeclarator",
16 "start":4,"end":52,"loc":{"start":{"line":1,"column":4,"index":4},"end":{"line":1,"column":52,"index":52}},
17 "id": {
18 "type": "Identifier",
19 "start":4,"end":5,"loc":{"start":{"line":1,"column":4,"index":4},"end":{"line":1,"column":5,"index":5},"identifierName":"f"},
20 "name": "f"
21 },
22 "init": {
23 "type": "ArrowFunctionExpression",
24 "start":8,"end":52,"loc":{"start":{"line":1,"column":8,"index":8},"end":{"line":1,"column":52,"index":52}},
25 "predicate": {
26 "type": "InferredPredicate",
27 "start":20,"end":27,"loc":{"start":{"line":1,"column":20,"index":20},"end":{"line":1,"column":27,"index":27}}
28 },
29 "returnType": null,
30 "id": null,
31 "generator": false,
32 "async": false,
33 "params": [
34 {
35 "type": "Identifier",
36 "start":9,"end":17,"loc":{"start":{"line":1,"column":9,"index":9},"end":{"line":1,"column":17,"index":17},"identifierName":"x"},
37 "name": "x",
38 "typeAnnotation": {
39 "type": "TypeAnnotation",
40 "start":10,"end":17,"loc":{"start":{"line":1,"column":10,"index":10},"end":{"line":1,"column":17,"index":17}},
41 "typeAnnotation": {
42 "type": "MixedTypeAnnotation",
43 "start":12,"end":17,"loc":{"start":{"line":1,"column":12,"index":12},"end":{"line":1,"column":17,"index":17}}
44 }
45 }
46 }
47 ],
48 "body": {
49 "type": "BinaryExpression",
50 "start":31,"end":52,"loc":{"start":{"line":1,"column":31,"index":31},"end":{"line":1,"column":52,"index":52}},
51 "left": {
52 "type": "UnaryExpression",
53 "start":31,"end":39,"loc":{"start":{"line":1,"column":31,"index":31},"end":{"line":1,"column":39,"index":39}},
54 "operator": "typeof",
55 "prefix": true,
56 "argument": {
57 "type": "Identifier",
58 "start":38,"end":39,"loc":{"start":{"line":1,"column":38,"index":38},"end":{"line":1,"column":39,"index":39},"identifierName":"x"},
59 "name": "x"
60 }
61 },
62 "operator": "===",
63 "right": {
64 "type": "StringLiteral",
65 "start":44,"end":52,"loc":{"start":{"line":1,"column":44,"index":44},"end":{"line":1,"column":52,"index":52}},
66 "extra": {
67 "rawValue": "string",
68 "raw": "\"string\""
69 },
70 "value": "string"
71 }
72 }
73 }
74 }
75 ],
76 "kind": "var"
77 }
78 ],
79 "directives": []
80 }
81 }