Repository navigation
Commit f57e0fc
authored
fix(tooling): count every escape hatch and inferred type argument (#23041)
* fix(tooling): count every escape hatch and inferred type argument
Read escape hatches from the syntax tree instead of a regex over a list of
JSDoc tags, which missed `@template` defaults, `@extends` and raw
`any`/`object`/`Function`, and counted `unknown` inside string types.
Count `declarations/` too. Count `new` and generic calls whose type
arguments TypeScript fills with `any`, such as `new Map()`.
* refactor(types): type the type arguments inferred as any
* fix(tooling): count lib's default any type arguments
A type parameter that lib declares with an `any` default, as `Set` and
`WeakMap` do, still counts as inferred; only a default this project
declares is a choice. Type the four calls it finds, and keep the
StackedMap sentinel in its compressed map's type.
* fix(watch): drop a running child's missing watching from MultiWatching
When a child compiler is already running, its `watch()` reports the error
and returns `undefined`. `MultiCompiler.watch` kept that entry, so every
later `close`, `suspend`, `resume` or `invalidate` on the returned
watching, `compiler.close()` included, threw a TypeError.1 parent 4fdd148 commit f57e0fc
34 files changed
Lines changed: 348 additions & 72 deletions
File tree
- .changeset
- hot
- lib
- cache
- config
- css
- define
- dependencies/helpers
- fs
- graph
- html
- javascript
- logging
- module
- optimize
- util
- test/unitCases
- tooling
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3184 | 3184 | | |
3185 | 3185 | | |
3186 | 3186 | | |
| 3187 | + | |
3187 | 3188 | | |
3188 | 3189 | | |
3189 | 3190 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
756 | 756 | | |
757 | 757 | | |
758 | 758 | | |
| 759 | + | |
759 | 760 | | |
760 | 761 | | |
761 | 762 | | |
| |||
769 | 770 | | |
770 | 771 | | |
771 | 772 | | |
772 | | - | |
773 | | - | |
| 773 | + | |
| 774 | + | |
774 | 775 | | |
775 | 776 | | |
776 | 777 | | |
| |||
779 | 780 | | |
780 | 781 | | |
781 | 782 | | |
782 | | - | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
783 | 788 | | |
784 | 789 | | |
785 | 790 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
80 | 82 | | |
81 | 83 | | |
82 | 84 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
555 | 555 | | |
556 | 556 | | |
557 | 557 | | |
558 | | - | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
559 | 562 | | |
560 | 563 | | |
561 | 564 | | |
| |||
613 | 616 | | |
614 | 617 | | |
615 | 618 | | |
616 | | - | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
617 | 623 | | |
618 | 624 | | |
619 | 625 | | |
620 | 626 | | |
621 | 627 | | |
622 | 628 | | |
623 | 629 | | |
624 | | - | |
| 630 | + | |
625 | 631 | | |
626 | 632 | | |
627 | 633 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9527 | 9527 | | |
9528 | 9528 | | |
9529 | 9529 | | |
| 9530 | + | |
9530 | 9531 | | |
9531 | 9532 | | |
9532 | 9533 | | |
| |||
9543 | 9544 | | |
9544 | 9545 | | |
9545 | 9546 | | |
| 9547 | + | |
9546 | 9548 | | |
9547 | 9549 | | |
9548 | 9550 | | |
| |||
10093 | 10095 | | |
10094 | 10096 | | |
10095 | 10097 | | |
| 10098 | + | |
10096 | 10099 | | |
10097 | 10100 | | |
10098 | 10101 | | |
| |||
16444 | 16447 | | |
16445 | 16448 | | |
16446 | 16449 | | |
| 16450 | + | |
16447 | 16451 | | |
16448 | 16452 | | |
16449 | 16453 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
620 | 620 | | |
621 | 621 | | |
622 | 622 | | |
| 623 | + | |
623 | 624 | | |
624 | 625 | | |
625 | 626 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
176 | | - | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
177 | 179 | | |
178 | 180 | | |
179 | 181 | | |
| |||
1381 | 1383 | | |
1382 | 1384 | | |
1383 | 1385 | | |
| 1386 | + | |
1384 | 1387 | | |
1385 | 1388 | | |
1386 | 1389 | | |
1387 | 1390 | | |
1388 | 1391 | | |
1389 | 1392 | | |
1390 | 1393 | | |
| 1394 | + | |
1391 | 1395 | | |
1392 | 1396 | | |
1393 | 1397 | | |
1394 | 1398 | | |
1395 | 1399 | | |
1396 | 1400 | | |
1397 | 1401 | | |
| 1402 | + | |
1398 | 1403 | | |
1399 | 1404 | | |
1400 | 1405 | | |
| |||
0 commit comments