10
const y = x * 2;
11
const arr = [x, y];
12
const obj = {x, y};
13
+ let destA, destB;
14
+ if (y > 5) {
15
+ [destA, destB] = arr;
16
+ }
17
+
18
const [a, b] = arr;
19
const {x: c, y: d} = obj;
20
+ let sound;
21
+
22
+ if (y > 10) {
23
+ sound = 'woof';
24
+ } else {
25
+ sound = 'meow';
26
+ }
27
28
useEffect(() => {
29
if (a > 10) {
30
console.log(a);
31
+ console.log(sound);
32
+ console.log(destA, destB);
33
}
20
- }, [a]);
34
+ }, [a, sound, destA, destB]);
35
36
const foo = useCallback(() => {
37
return a + b;
52
## Error
53
54
```
41
-Found 13 errors:
55
+Found 25 errors:
56
57
Todo: Important source location missing in generated code
58
45
-Source location for VariableDeclarator is missing in the generated output. This can cause coverage instrumentation to fail to track this code properly, resulting in inaccurate coverage reports..
59
+Source location for Identifier is missing in the generated output. This can cause coverage instrumentation to fail to track this code properly, resulting in inaccurate coverage reports..
60
47
-error.todo-missing-source-locations.ts:5:8
61
+error.todo-missing-source-locations.ts:4:9
62
+ 2 | import {useEffect, useCallback} from 'react';
63
3 |
49
- 4 | function Component({prop1, prop2}) {
50
-> 5 | const x = prop1 + prop2;
51
- | ^^^^^^^^^^^^^^^^^
64
+> 4 | function Component({prop1, prop2}) {
65
+ | ^^^^^^^^^
66
+ 5 | const x = prop1 + prop2;
67
6 | const y = x * 2;
68
7 | const arr = [x, y];
54
- 8 | const obj = {x, y};
69
70
Todo: Important source location missing in generated code
71
58
-Source location for VariableDeclarator is missing in the generated output. This can cause coverage instrumentation to fail to track this code properly, resulting in inaccurate coverage reports..
72
+Source location for VariableDeclaration is missing in the generated output. This can cause coverage instrumentation to fail to track this code properly, resulting in inaccurate coverage reports..
73
60
-error.todo-missing-source-locations.ts:6:8
61
- 4 | function Component({prop1, prop2}) {
62
- 5 | const x = prop1 + prop2;
63
-> 6 | const y = x * 2;
64
- | ^^^^^^^^^
65
- 7 | const arr = [x, y];
66
- 8 | const obj = {x, y};
67
- 9 | const [a, b] = arr;
74
+error.todo-missing-source-locations.ts:9:2
75
+ 7 | const arr = [x, y];
76
+ 8 | const obj = {x, y};
77
+> 9 | let destA, destB;
78
+ | ^^^^^^^^^^^^^^^^^
79
+ 10 | if (y > 5) {
80
+ 11 | [destA, destB] = arr;
81
+ 12 | }
82
83
Todo: Important source location missing in generated code
84
71
-Source location for VariableDeclarator is missing in the generated output. This can cause coverage instrumentation to fail to track this code properly, resulting in inaccurate coverage reports..
85
+Source location for ExpressionStatement is missing in the generated output. This can cause coverage instrumentation to fail to track this code properly, resulting in inaccurate coverage reports..
86
73
-error.todo-missing-source-locations.ts:7:8
74
- 5 | const x = prop1 + prop2;
75
- 6 | const y = x * 2;
76
-> 7 | const arr = [x, y];
77
- | ^^^^^^^^^^^^
78
- 8 | const obj = {x, y};
79
- 9 | const [a, b] = arr;
80
- 10 | const {x: c, y: d} = obj;
87
+error.todo-missing-source-locations.ts:11:4
88
+ 9 | let destA, destB;
89
+ 10 | if (y > 5) {
90
+> 11 | [destA, destB] = arr;
91
+ | ^^^^^^^^^^^^^^^^^^^^^
92
+ 12 | }
93
+ 13 |
94
+ 14 | const [a, b] = arr;
95
96
Todo: Important source location missing in generated code
97
84
-Source location for VariableDeclarator is missing in the generated output. This can cause coverage instrumentation to fail to track this code properly, resulting in inaccurate coverage reports..
98
+Source location for Identifier is missing in the generated output. This can cause coverage instrumentation to fail to track this code properly, resulting in inaccurate coverage reports..
99
86
-error.todo-missing-source-locations.ts:8:8
87
- 6 | const y = x * 2;
88
- 7 | const arr = [x, y];
89
-> 8 | const obj = {x, y};
90
- | ^^^^^^^^^^^^
91
- 9 | const [a, b] = arr;
92
- 10 | const {x: c, y: d} = obj;
93
- 11 |
100
+error.todo-missing-source-locations.ts:15:9
101
+ 13 |
102
+ 14 | const [a, b] = arr;
103
+> 15 | const {x: c, y: d} = obj;
104
+ | ^
105
+ 16 | let sound;
106
+ 17 |
107
+ 18 | if (y > 10) {
108
109
Todo: Important source location missing in generated code
110
97
-Source location for VariableDeclarator is missing in the generated output. This can cause coverage instrumentation to fail to track this code properly, resulting in inaccurate coverage reports..
111
+Source location for Identifier is missing in the generated output. This can cause coverage instrumentation to fail to track this code properly, resulting in inaccurate coverage reports..
112
99
-error.todo-missing-source-locations.ts:9:8
100
- 7 | const arr = [x, y];
101
- 8 | const obj = {x, y};
102
-> 9 | const [a, b] = arr;
103
- | ^^^^^^^^^^^^
104
- 10 | const {x: c, y: d} = obj;
105
- 11 |
106
- 12 | useEffect(() => {
113
+error.todo-missing-source-locations.ts:15:15
114
+ 13 |
115
+ 14 | const [a, b] = arr;
116
+> 15 | const {x: c, y: d} = obj;
117
+ | ^
118
+ 16 | let sound;
119
+ 17 |
120
+ 18 | if (y > 10) {
121
122
Todo: Important source location missing in generated code
123
110
-Source location for VariableDeclarator is missing in the generated output. This can cause coverage instrumentation to fail to track this code properly, resulting in inaccurate coverage reports..
124
+Source location for VariableDeclaration is missing in the generated output. This can cause coverage instrumentation to fail to track this code properly, resulting in inaccurate coverage reports..
125
112
-error.todo-missing-source-locations.ts:10:8
113
- 8 | const obj = {x, y};
114
- 9 | const [a, b] = arr;
115
-> 10 | const {x: c, y: d} = obj;
116
- | ^^^^^^^^^^^^^^^^^^
117
- 11 |
118
- 12 | useEffect(() => {
119
- 13 | if (a > 10) {
126
+error.todo-missing-source-locations.ts:16:2
127
+ 14 | const [a, b] = arr;
128
+ 15 | const {x: c, y: d} = obj;
129
+> 16 | let sound;
130
+ | ^^^^^^^^^^
131
+ 17 |
132
+ 18 | if (y > 10) {
133
+ 19 | sound = 'woof';
134
135
Todo: Important source location missing in generated code
136
137
Source location for ExpressionStatement is missing in the generated output. This can cause coverage instrumentation to fail to track this code properly, resulting in inaccurate coverage reports..
138
125
-error.todo-missing-source-locations.ts:12:2
126
- 10 | const {x: c, y: d} = obj;
127
- 11 |
128
-> 12 | useEffect(() => {
139
+error.todo-missing-source-locations.ts:19:4
140
+ 17 |
141
+ 18 | if (y > 10) {
142
+> 19 | sound = 'woof';
143
+ | ^^^^^^^^^^^^^^^
144
+ 20 | } else {
145
+ 21 | sound = 'meow';
146
+ 22 | }
147
+
148
+Todo: Important source location has wrong node type in generated code
149
+
150
+Source location for Identifier exists in the generated output but with wrong node type(s): ExpressionStatement. This can cause coverage instrumentation to fail to track this code properly, resulting in inaccurate coverage reports..
151
+
152
+error.todo-missing-source-locations.ts:19:4
153
+ 17 |
154
+ 18 | if (y > 10) {
155
+> 19 | sound = 'woof';
156
+ | ^^^^^
157
+ 20 | } else {
158
+ 21 | sound = 'meow';
159
+ 22 | }
160
+
161
+Todo: Important source location missing in generated code
162
+
163
+Source location for ExpressionStatement is missing in the generated output. This can cause coverage instrumentation to fail to track this code properly, resulting in inaccurate coverage reports..
164
+
165
+error.todo-missing-source-locations.ts:21:4
166
+ 19 | sound = 'woof';
167
+ 20 | } else {
168
+> 21 | sound = 'meow';
169
+ | ^^^^^^^^^^^^^^^
170
+ 22 | }
171
+ 23 |
172
+ 24 | useEffect(() => {
173
+
174
+Todo: Important source location has wrong node type in generated code
175
+
176
+Source location for Identifier exists in the generated output but with wrong node type(s): ExpressionStatement. This can cause coverage instrumentation to fail to track this code properly, resulting in inaccurate coverage reports..
177
+
178
+error.todo-missing-source-locations.ts:21:4
179
+ 19 | sound = 'woof';
180
+ 20 | } else {
181
+> 21 | sound = 'meow';
182
+ | ^^^^^
183
+ 22 | }
184
+ 23 |
185
+ 24 | useEffect(() => {
186
+
187
+Todo: Important source location missing in generated code
188
+
189
+Source location for ExpressionStatement is missing in the generated output. This can cause coverage instrumentation to fail to track this code properly, resulting in inaccurate coverage reports..
190
+
191
+error.todo-missing-source-locations.ts:24:2
192
+ 22 | }
193
+ 23 |
194
+> 24 | useEffect(() => {
195
| ^^^^^^^^^^^^^^^^^
130
-> 13 | if (a > 10) {
196
+> 25 | if (a > 10) {
197
| ^^^^^^^^^^^^^^^^^
132
-> 14 | console.log(a);
198
+> 26 | console.log(a);
199
| ^^^^^^^^^^^^^^^^^
134
-> 15 | }
200
+> 27 | console.log(sound);
201
| ^^^^^^^^^^^^^^^^^
136
-> 16 | }, [a]);
137
- | ^^^^^^^^^^^
138
- 17 |
139
- 18 | const foo = useCallback(() => {
140
- 19 | return a + b;
202
+> 28 | console.log(destA, destB);
203
+ | ^^^^^^^^^^^^^^^^^
204
+> 29 | }
205
+ | ^^^^^^^^^^^^^^^^^
206
+> 30 | }, [a, sound, destA, destB]);
207
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
208
+ 31 |
209
+ 32 | const foo = useCallback(() => {
210
+ 33 | return a + b;
211
212
Todo: Important source location missing in generated code
213
214
Source location for ExpressionStatement is missing in the generated output. This can cause coverage instrumentation to fail to track this code properly, resulting in inaccurate coverage reports..
215
146
-error.todo-missing-source-locations.ts:14:6
147
- 12 | useEffect(() => {
148
- 13 | if (a > 10) {
149
-> 14 | console.log(a);
216
+error.todo-missing-source-locations.ts:26:6
217
+ 24 | useEffect(() => {
218
+ 25 | if (a > 10) {
219
+> 26 | console.log(a);
220
| ^^^^^^^^^^^^^^^
151
- 15 | }
152
- 16 | }, [a]);
153
- 17 |
221
+ 27 | console.log(sound);
222
+ 28 | console.log(destA, destB);
223
+ 29 | }
224
225
Todo: Important source location missing in generated code
226
157
-Source location for VariableDeclarator is missing in the generated output. This can cause coverage instrumentation to fail to track this code properly, resulting in inaccurate coverage reports..
227
+Source location for Identifier is missing in the generated output. This can cause coverage instrumentation to fail to track this code properly, resulting in inaccurate coverage reports..
228
159
-error.todo-missing-source-locations.ts:18:8
160
- 16 | }, [a]);
161
- 17 |
162
-> 18 | const foo = useCallback(() => {
163
- | ^^^^^^^^^^^^^^^^^^^^^^^^^
164
-> 19 | return a + b;
165
- | ^^^^^^^^^^^^^^^^^
166
-> 20 | }, [a, b]);
167
- | ^^^^^^^^^^^^^
168
- 21 |
169
- 22 | function bar() {
170
- 23 | return (c + d) * 2;
229
+error.todo-missing-source-locations.ts:26:14
230
+ 24 | useEffect(() => {
231
+ 25 | if (a > 10) {
232
+> 26 | console.log(a);
233
+ | ^^^
234
+ 27 | console.log(sound);
235
+ 28 | console.log(destA, destB);
236
+ 29 | }
237
+
238
+Todo: Important source location missing in generated code
239
+
240
+Source location for ExpressionStatement is missing in the generated output. This can cause coverage instrumentation to fail to track this code properly, resulting in inaccurate coverage reports..
241
+
242
+error.todo-missing-source-locations.ts:27:6
243
+ 25 | if (a > 10) {
244
+ 26 | console.log(a);
245
+> 27 | console.log(sound);
246
+ | ^^^^^^^^^^^^^^^^^^^
247
+ 28 | console.log(destA, destB);
248
+ 29 | }
249
+ 30 | }, [a, sound, destA, destB]);
250
+
251
+Todo: Important source location missing in generated code
252
+
253
+Source location for Identifier is missing in the generated output. This can cause coverage instrumentation to fail to track this code properly, resulting in inaccurate coverage reports..
254
+
255
+error.todo-missing-source-locations.ts:27:14
256
+ 25 | if (a > 10) {
257
+ 26 | console.log(a);
258
+> 27 | console.log(sound);
259
+ | ^^^
260
+ 28 | console.log(destA, destB);
261
+ 29 | }
262
+ 30 | }, [a, sound, destA, destB]);
263
+
264
+Todo: Important source location missing in generated code
265
+
266
+Source location for ExpressionStatement is missing in the generated output. This can cause coverage instrumentation to fail to track this code properly, resulting in inaccurate coverage reports..
267
+
268
+error.todo-missing-source-locations.ts:28:6
269
+ 26 | console.log(a);
270
+ 27 | console.log(sound);
271
+> 28 | console.log(destA, destB);
272
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^
273
+ 29 | }
274
+ 30 | }, [a, sound, destA, destB]);
275
+ 31 |
276
+
277
+Todo: Important source location missing in generated code
278
+
279
+Source location for Identifier is missing in the generated output. This can cause coverage instrumentation to fail to track this code properly, resulting in inaccurate coverage reports..
280
+
281
+error.todo-missing-source-locations.ts:28:14
282
+ 26 | console.log(a);
283
+ 27 | console.log(sound);
284
+> 28 | console.log(destA, destB);
285
+ | ^^^
286
+ 29 | }
287
+ 30 | }, [a, sound, destA, destB]);
288
+ 31 |
289
+
290
+Todo: Important source location missing in generated code
291
+
292
+Source location for Identifier is missing in the generated output. This can cause coverage instrumentation to fail to track this code properly, resulting in inaccurate coverage reports..
293
+
294
+error.todo-missing-source-locations.ts:32:14
295
+ 30 | }, [a, sound, destA, destB]);
296
+ 31 |
297
+> 32 | const foo = useCallback(() => {
298
+ | ^^^^^^^^^^^
299
+ 33 | return a + b;
300
+ 34 | }, [a, b]);
301
+ 35 |
302
303
Todo: Important source location missing in generated code
304
305
Source location for ReturnStatement is missing in the generated output. This can cause coverage instrumentation to fail to track this code properly, resulting in inaccurate coverage reports..
306
176
-error.todo-missing-source-locations.ts:19:4
177
- 17 |
178
- 18 | const foo = useCallback(() => {
179
-> 19 | return a + b;
307
+error.todo-missing-source-locations.ts:33:4
308
+ 31 |
309
+ 32 | const foo = useCallback(() => {
310
+> 33 | return a + b;
311
| ^^^^^^^^^^^^^
181
- 20 | }, [a, b]);
182
- 21 |
183
- 22 | function bar() {
312
+ 34 | }, [a, b]);
313
+ 35 |
314
+ 36 | function bar() {
315
+
316
+Todo: Important source location missing in generated code
317
+
318
+Source location for Identifier is missing in the generated output. This can cause coverage instrumentation to fail to track this code properly, resulting in inaccurate coverage reports..
319
+
320
+error.todo-missing-source-locations.ts:34:6
321
+ 32 | const foo = useCallback(() => {
322
+ 33 | return a + b;
323
+> 34 | }, [a, b]);
324
+ | ^
325
+ 35 |
326
+ 36 | function bar() {
327
+ 37 | return (c + d) * 2;
328
+
329
+Todo: Important source location missing in generated code
330
+
331
+Source location for Identifier is missing in the generated output. This can cause coverage instrumentation to fail to track this code properly, resulting in inaccurate coverage reports..
332
+
333
+error.todo-missing-source-locations.ts:34:9
334
+ 32 | const foo = useCallback(() => {
335
+ 33 | return a + b;
336
+> 34 | }, [a, b]);
337
+ | ^
338
+ 35 |
339
+ 36 | function bar() {
340
+ 37 | return (c + d) * 2;
341
342
Todo: Important source location missing in generated code
343
344
Source location for ReturnStatement is missing in the generated output. This can cause coverage instrumentation to fail to track this code properly, resulting in inaccurate coverage reports..
345
189
-error.todo-missing-source-locations.ts:23:4
190
- 21 |
191
- 22 | function bar() {
192
-> 23 | return (c + d) * 2;
346
+error.todo-missing-source-locations.ts:37:4
347
+ 35 |
348
+ 36 | function bar() {
349
+> 37 | return (c + d) * 2;
350
| ^^^^^^^^^^^^^^^^^^^
194
- 24 | }
195
- 25 |
196
- 26 | console.log('Hello, world!');
351
+ 38 | }
352
+ 39 |
353
+ 40 | console.log('Hello, world!');
354
355
Todo: Important source location missing in generated code
356
357
Source location for ExpressionStatement is missing in the generated output. This can cause coverage instrumentation to fail to track this code properly, resulting in inaccurate coverage reports..
358
202
-error.todo-missing-source-locations.ts:26:2
203
- 24 | }
204
- 25 |
205
-> 26 | console.log('Hello, world!');
359
+error.todo-missing-source-locations.ts:40:2
360
+ 38 | }
361
+ 39 |
362
+> 40 | console.log('Hello, world!');
363
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
207
- 27 |
208
- 28 | return [y, foo, bar];
209
- 29 | }
364
+ 41 |
365
+ 42 | return [y, foo, bar];
366
+ 43 | }
367
+
368
+Todo: Important source location missing in generated code
369
+
370
+Source location for Identifier is missing in the generated output. This can cause coverage instrumentation to fail to track this code properly, resulting in inaccurate coverage reports..
371
+
372
+error.todo-missing-source-locations.ts:40:10
373
+ 38 | }
374
+ 39 |
375
+> 40 | console.log('Hello, world!');
376
+ | ^^^
377
+ 41 |
378
+ 42 | return [y, foo, bar];
379
+ 43 | }
380
381
Todo: Important source location missing in generated code
382
383
Source location for ReturnStatement is missing in the generated output. This can cause coverage instrumentation to fail to track this code properly, resulting in inaccurate coverage reports..
384
215
-error.todo-missing-source-locations.ts:28:2
216
- 26 | console.log('Hello, world!');
217
- 27 |
218
-> 28 | return [y, foo, bar];
385
+error.todo-missing-source-locations.ts:42:2
386
+ 40 | console.log('Hello, world!');
387
+ 41 |
388
+> 42 | return [y, foo, bar];
389
| ^^^^^^^^^^^^^^^^^^^^^
220
- 29 | }
221
- 30 |
390
+ 43 | }
391
+ 44 |
392
```
393
394
\ No newline at end of file