/
output.json
118 lines (118 loc) 路 4.96 KB
/
output.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
{
"type": "File",
"start":0,"end":68,"loc":{"start":{"line":1,"column":0},"end":{"line":3,"column":1}},
"program": {
"type": "Program",
"start":0,"end":68,"loc":{"start":{"line":1,"column":0},"end":{"line":3,"column":1}},
"sourceType": "module",
"interpreter": null,
"body": [
{
"type": "VariableDeclaration",
"start":0,"end":68,"loc":{"start":{"line":1,"column":0},"end":{"line":3,"column":1}},
"declarations": [
{
"type": "VariableDeclarator",
"start":6,"end":68,"loc":{"start":{"line":1,"column":6},"end":{"line":3,"column":1}},
"id": {
"type": "Identifier",
"start":6,"end":8,"loc":{"start":{"line":1,"column":6},"end":{"line":1,"column":8},"identifierName":"fn"},
"name": "fn"
},
"init": {
"type": "FunctionExpression",
"start":11,"end":68,"loc":{"start":{"line":1,"column":11},"end":{"line":3,"column":1}},
"id": null,
"generator": true,
"async": false,
"typeParameters": {
"type": "TypeParameterDeclaration",
"start":21,"end":24,"loc":{"start":{"line":1,"column":21},"end":{"line":1,"column":24}},
"params": [
{
"type": "TypeParameter",
"start":22,"end":23,"loc":{"start":{"line":1,"column":22},"end":{"line":1,"column":23}},
"name": "T",
"variance": null
}
]
},
"params": [
{
"type": "Identifier",
"start":25,"end":33,"loc":{"start":{"line":1,"column":25},"end":{"line":1,"column":33},"identifierName":"input"},
"name": "input",
"typeAnnotation": {
"type": "TypeAnnotation",
"start":30,"end":33,"loc":{"start":{"line":1,"column":30},"end":{"line":1,"column":33}},
"typeAnnotation": {
"type": "GenericTypeAnnotation",
"start":32,"end":33,"loc":{"start":{"line":1,"column":32},"end":{"line":1,"column":33}},
"typeParameters": null,
"id": {
"type": "Identifier",
"start":32,"end":33,"loc":{"start":{"line":1,"column":32},"end":{"line":1,"column":33},"identifierName":"T"},
"name": "T"
}
}
}
}
],
"predicate": null,
"returnType": {
"type": "TypeAnnotation",
"start":34,"end":53,"loc":{"start":{"line":1,"column":34},"end":{"line":1,"column":53}},
"typeAnnotation": {
"type": "GenericTypeAnnotation",
"start":36,"end":53,"loc":{"start":{"line":1,"column":36},"end":{"line":1,"column":53}},
"typeParameters": {
"type": "TypeParameterInstantiation",
"start":45,"end":53,"loc":{"start":{"line":1,"column":45},"end":{"line":1,"column":53}},
"params": [
{
"type": "NumberTypeAnnotation",
"start":46,"end":52,"loc":{"start":{"line":1,"column":46},"end":{"line":1,"column":52}}
}
]
},
"id": {
"type": "Identifier",
"start":36,"end":45,"loc":{"start":{"line":1,"column":36},"end":{"line":1,"column":45},"identifierName":"Generator"},
"name": "Generator"
}
}
},
"body": {
"type": "BlockStatement",
"start":54,"end":68,"loc":{"start":{"line":1,"column":54},"end":{"line":3,"column":1}},
"body": [
{
"type": "ExpressionStatement",
"start":58,"end":66,"loc":{"start":{"line":2,"column":2},"end":{"line":2,"column":10}},
"expression": {
"type": "YieldExpression",
"start":58,"end":65,"loc":{"start":{"line":2,"column":2},"end":{"line":2,"column":9}},
"delegate": false,
"argument": {
"type": "NumericLiteral",
"start":64,"end":65,"loc":{"start":{"line":2,"column":8},"end":{"line":2,"column":9}},
"extra": {
"rawValue": 2,
"raw": "2"
},
"value": 2
}
}
}
],
"directives": []
}
}
}
],
"kind": "const"
}
],
"directives": []
}
}