Skip to content

Commit 4c532b6

Browse files
committed
add tests
1 parent 8274082 commit 4c532b6

File tree

2 files changed

+306
-0
lines changed
  • test
    • arrow-function_type_test_async_generic_after_import
    • arrow-function_type_test_async_generic_with_commented_import

2 files changed

+306
-0
lines changed
Lines changed: 170 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
{
2+
"type": "Program",
3+
"start": 0,
4+
"end": 73,
5+
"loc": {
6+
"start": {
7+
"line": 1,
8+
"column": 0
9+
},
10+
"end": {
11+
"line": 3,
12+
"column": 46
13+
}
14+
},
15+
"body": [
16+
{
17+
"type": "ImportDeclaration",
18+
"start": 0,
19+
"end": 25,
20+
"loc": {
21+
"start": {
22+
"line": 1,
23+
"column": 0
24+
},
25+
"end": {
26+
"line": 1,
27+
"column": 25
28+
}
29+
},
30+
"importKind": "value",
31+
"specifiers": [],
32+
"source": {
33+
"type": "Literal",
34+
"start": 15,
35+
"end": 25,
36+
"loc": {
37+
"start": {
38+
"line": 1,
39+
"column": 15
40+
},
41+
"end": {
42+
"line": 1,
43+
"column": 25
44+
}
45+
},
46+
"value": "./config",
47+
"raw": "'./config'"
48+
}
49+
},
50+
{
51+
"type": "VariableDeclaration",
52+
"start": 27,
53+
"end": 73,
54+
"loc": {
55+
"start": {
56+
"line": 3,
57+
"column": 0
58+
},
59+
"end": {
60+
"line": 3,
61+
"column": 46
62+
}
63+
},
64+
"declarations": [
65+
{
66+
"type": "VariableDeclarator",
67+
"start": 33,
68+
"end": 72,
69+
"loc": {
70+
"start": {
71+
"line": 3,
72+
"column": 6
73+
},
74+
"end": {
75+
"line": 3,
76+
"column": 45
77+
}
78+
},
79+
"id": {
80+
"type": "Identifier",
81+
"start": 33,
82+
"end": 52,
83+
"loc": {
84+
"start": {
85+
"line": 3,
86+
"column": 6
87+
},
88+
"end": {
89+
"line": 3,
90+
"column": 25
91+
}
92+
},
93+
"name": "loadDataWithGeneric"
94+
},
95+
"init": {
96+
"type": "ArrowFunctionExpression",
97+
"start": 55,
98+
"end": 72,
99+
"loc": {
100+
"start": {
101+
"line": 3,
102+
"column": 28
103+
},
104+
"end": {
105+
"line": 3,
106+
"column": 45
107+
}
108+
},
109+
"typeParameters": {
110+
"type": "TSTypeParameterDeclaration",
111+
"start": 61,
112+
"end": 64,
113+
"loc": {
114+
"start": {
115+
"line": 3,
116+
"column": 34
117+
},
118+
"end": {
119+
"line": 3,
120+
"column": 37
121+
}
122+
},
123+
"params": [
124+
{
125+
"type": "TSTypeParameter",
126+
"start": 62,
127+
"end": 63,
128+
"loc": {
129+
"start": {
130+
"line": 3,
131+
"column": 35
132+
},
133+
"end": {
134+
"line": 3,
135+
"column": 36
136+
}
137+
},
138+
"name": "T"
139+
}
140+
]
141+
},
142+
"params": [],
143+
"id": null,
144+
"expression": false,
145+
"generator": false,
146+
"async": true,
147+
"body": {
148+
"type": "BlockStatement",
149+
"start": 70,
150+
"end": 72,
151+
"loc": {
152+
"start": {
153+
"line": 3,
154+
"column": 43
155+
},
156+
"end": {
157+
"line": 3,
158+
"column": 45
159+
}
160+
},
161+
"body": []
162+
}
163+
}
164+
}
165+
],
166+
"kind": "const"
167+
}
168+
],
169+
"sourceType": "module"
170+
}
Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
{
2+
"type": "Program",
3+
"start": 0,
4+
"end": 76,
5+
"loc": {
6+
"start": {
7+
"line": 1,
8+
"column": 0
9+
},
10+
"end": {
11+
"line": 3,
12+
"column": 46
13+
}
14+
},
15+
"body": [
16+
{
17+
"type": "VariableDeclaration",
18+
"start": 30,
19+
"end": 76,
20+
"loc": {
21+
"start": {
22+
"line": 3,
23+
"column": 0
24+
},
25+
"end": {
26+
"line": 3,
27+
"column": 46
28+
}
29+
},
30+
"declarations": [
31+
{
32+
"type": "VariableDeclarator",
33+
"start": 36,
34+
"end": 75,
35+
"loc": {
36+
"start": {
37+
"line": 3,
38+
"column": 6
39+
},
40+
"end": {
41+
"line": 3,
42+
"column": 45
43+
}
44+
},
45+
"id": {
46+
"type": "Identifier",
47+
"start": 36,
48+
"end": 55,
49+
"loc": {
50+
"start": {
51+
"line": 3,
52+
"column": 6
53+
},
54+
"end": {
55+
"line": 3,
56+
"column": 25
57+
}
58+
},
59+
"name": "loadDataWithGeneric"
60+
},
61+
"init": {
62+
"type": "ArrowFunctionExpression",
63+
"start": 58,
64+
"end": 75,
65+
"loc": {
66+
"start": {
67+
"line": 3,
68+
"column": 28
69+
},
70+
"end": {
71+
"line": 3,
72+
"column": 45
73+
}
74+
},
75+
"typeParameters": {
76+
"type": "TSTypeParameterDeclaration",
77+
"start": 64,
78+
"end": 67,
79+
"loc": {
80+
"start": {
81+
"line": 3,
82+
"column": 34
83+
},
84+
"end": {
85+
"line": 3,
86+
"column": 37
87+
}
88+
},
89+
"params": [
90+
{
91+
"type": "TSTypeParameter",
92+
"start": 65,
93+
"end": 66,
94+
"loc": {
95+
"start": {
96+
"line": 3,
97+
"column": 35
98+
},
99+
"end": {
100+
"line": 3,
101+
"column": 36
102+
}
103+
},
104+
"name": "T"
105+
}
106+
]
107+
},
108+
"params": [],
109+
"id": null,
110+
"expression": false,
111+
"generator": false,
112+
"async": true,
113+
"body": {
114+
"type": "BlockStatement",
115+
"start": 73,
116+
"end": 75,
117+
"loc": {
118+
"start": {
119+
"line": 3,
120+
"column": 43
121+
},
122+
"end": {
123+
"line": 3,
124+
"column": 45
125+
}
126+
},
127+
"body": []
128+
}
129+
}
130+
}
131+
],
132+
"kind": "const"
133+
}
134+
],
135+
"sourceType": "module"
136+
}

0 commit comments

Comments
 (0)