/
output.json
106 lines (106 loc) 路 4.31 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
{
"type": "File",
"start":0,"end":26,"loc":{"start":{"line":1,"column":0},"end":{"line":2,"column":14}},
"errors": [
"SyntaxError: Did not expect a type annotation here. (1:5)",
"SyntaxError: Did not expect a type annotation here. (2:8)"
],
"program": {
"type": "Program",
"start":0,"end":26,"loc":{"start":{"line":1,"column":0},"end":{"line":2,"column":14}},
"sourceType": "module",
"interpreter": null,
"body": [
{
"type": "ExpressionStatement",
"start":0,"end":11,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":11}},
"expression": {
"type": "CallExpression",
"start":0,"end":10,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":10}},
"callee": {
"type": "Identifier",
"start":0,"end":4,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":4},"identifierName":"func"},
"name": "func"
},
"arguments": [
{
"type": "TSTypeCastExpression",
"start":5,"end":9,"loc":{"start":{"line":1,"column":5},"end":{"line":1,"column":9}},
"expression": {
"type": "Identifier",
"start":5,"end":6,"loc":{"start":{"line":1,"column":5},"end":{"line":1,"column":6},"identifierName":"a"},
"name": "a"
},
"typeAnnotation": {
"type": "TSTypeAnnotation",
"start":6,"end":9,"loc":{"start":{"line":1,"column":6},"end":{"line":1,"column":9}},
"typeAnnotation": {
"type": "TSTypeReference",
"start":8,"end":9,"loc":{"start":{"line":1,"column":8},"end":{"line":1,"column":9}},
"typeName": {
"type": "Identifier",
"start":8,"end":9,"loc":{"start":{"line":1,"column":8},"end":{"line":1,"column":9},"identifierName":"T"},
"name": "T"
}
}
}
}
]
}
},
{
"type": "ExpressionStatement",
"start":12,"end":26,"loc":{"start":{"line":2,"column":0},"end":{"line":2,"column":14}},
"expression": {
"type": "CallExpression",
"start":12,"end":25,"loc":{"start":{"line":2,"column":0},"end":{"line":2,"column":13}},
"callee": {
"type": "Identifier",
"start":12,"end":16,"loc":{"start":{"line":2,"column":0},"end":{"line":2,"column":4},"identifierName":"func"},
"name": "func"
},
"arguments": [
{
"type": "TSTypeCastExpression",
"start":20,"end":24,"loc":{"start":{"line":2,"column":8},"end":{"line":2,"column":12}},
"expression": {
"type": "Identifier",
"start":20,"end":21,"loc":{"start":{"line":2,"column":8},"end":{"line":2,"column":9},"identifierName":"a"},
"name": "a"
},
"typeAnnotation": {
"type": "TSTypeAnnotation",
"start":21,"end":24,"loc":{"start":{"line":2,"column":9},"end":{"line":2,"column":12}},
"typeAnnotation": {
"type": "TSTypeReference",
"start":23,"end":24,"loc":{"start":{"line":2,"column":11},"end":{"line":2,"column":12}},
"typeName": {
"type": "Identifier",
"start":23,"end":24,"loc":{"start":{"line":2,"column":11},"end":{"line":2,"column":12},"identifierName":"T"},
"name": "T"
}
}
}
}
],
"typeParameters": {
"type": "TSTypeParameterInstantiation",
"start":16,"end":19,"loc":{"start":{"line":2,"column":4},"end":{"line":2,"column":7}},
"params": [
{
"type": "TSTypeReference",
"start":17,"end":18,"loc":{"start":{"line":2,"column":5},"end":{"line":2,"column":6}},
"typeName": {
"type": "Identifier",
"start":17,"end":18,"loc":{"start":{"line":2,"column":5},"end":{"line":2,"column":6},"identifierName":"T"},
"name": "T"
}
}
]
}
}
}
],
"directives": []
}
}