Commit 4487917
authored
Quick fix for no-implicit-any errors to add explicit type annotation (#14786)
* Infer from usage quick fix
* Change full function singature
* Add property/element access support
* Fix a few issues
* Some cleanup
* Expose getArrayType and getPromiseType
* Switch to collecting all usage before infering
* Infer array and promise type arguments
* Handel enums in binary operators
* consolidate usage of addCandidateTypes
* Handel rest paramters
* Properly handel `+=` and `+` inference for numbers and strings
* Add print quickfixes debug helper
* Add rest param tests
* Add optional paramter tests
* Handel set accessors
* Support getters
* Support no implicit any error for variable at use site
* Support properties
* Only offer quick fix if an infered type other than any is available
* Rename functions
* Move to a separate namespace
* Check cancellation token
* Cleanup
* Check for accesibile symbols where serializing types
* Remove JS support
* Reorganize functions
* Mark APIs as internal
* Fix lint errors
* Removed conflict markers.
* Update 'createSymbol' to use '__String'.
* Fixed most problems relating to '__String' and 'includeJsDocComments' in the fix itself.
* Addressed most API changes.
* Make all helpers internal
* Use a diffrent writer and not the built-in single line write
* Infer types for all parameters in a parameter list instead of one at a time
* Accept baselines
* Code review commments
* Respond to code review comments1 parent b5e6b89 commit 4487917
File tree
26 files changed
+893
-9
lines changed- src
- compiler
- services/codefixes
- tests
- baselines/reference/api
- cases/fourslash
26 files changed
+893
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
226 | 226 | | |
227 | 227 | | |
228 | 228 | | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
229 | 246 | | |
230 | 247 | | |
231 | 248 | | |
| |||
3675 | 3692 | | |
3676 | 3693 | | |
3677 | 3694 | | |
| 3695 | + | |
3678 | 3696 | | |
3679 | 3697 | | |
3680 | 3698 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
213 | 213 | | |
214 | 214 | | |
215 | 215 | | |
216 | | - | |
| 216 | + | |
| 217 | + | |
217 | 218 | | |
218 | 219 | | |
219 | | - | |
| 220 | + | |
220 | 221 | | |
| 222 | + | |
221 | 223 | | |
222 | 224 | | |
223 | 225 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3681 | 3681 | | |
3682 | 3682 | | |
3683 | 3683 | | |
| 3684 | + | |
3684 | 3685 | | |
3685 | 3686 | | |
3686 | 3687 | | |
| |||
3725 | 3726 | | |
3726 | 3727 | | |
3727 | 3728 | | |
3728 | | - | |
3729 | 3729 | | |
3730 | 3730 | | |
3731 | 3731 | | |
| |||
3734 | 3734 | | |
3735 | 3735 | | |
3736 | 3736 | | |
3737 | | - | |
3738 | 3737 | | |
3739 | 3738 | | |
3740 | 3739 | | |
3741 | 3740 | | |
3742 | | - | |
3743 | 3741 | | |
3744 | 3742 | | |
3745 | 3743 | | |
3746 | 3744 | | |
3747 | | - | |
3748 | 3745 | | |
3749 | 3746 | | |
3750 | 3747 | | |
3751 | 3748 | | |
3752 | | - | |
3753 | 3749 | | |
3754 | 3750 | | |
3755 | 3751 | | |
3756 | 3752 | | |
3757 | | - | |
3758 | 3753 | | |
3759 | 3754 | | |
3760 | 3755 | | |
3761 | 3756 | | |
3762 | | - | |
3763 | 3757 | | |
3764 | 3758 | | |
3765 | 3759 | | |
| 3760 | + | |
| 3761 | + | |
| 3762 | + | |
| 3763 | + | |
| 3764 | + | |
| 3765 | + | |
| 3766 | + | |
| 3767 | + | |
3766 | 3768 | | |
3767 | 3769 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2695 | 2695 | | |
2696 | 2696 | | |
2697 | 2697 | | |
| 2698 | + | |
| 2699 | + | |
| 2700 | + | |
| 2701 | + | |
| 2702 | + | |
| 2703 | + | |
| 2704 | + | |
| 2705 | + | |
| 2706 | + | |
| 2707 | + | |
| 2708 | + | |
| 2709 | + | |
| 2710 | + | |
| 2711 | + | |
| 2712 | + | |
| 2713 | + | |
| 2714 | + | |
| 2715 | + | |
2698 | 2716 | | |
2699 | 2717 | | |
2700 | 2718 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5649 | 5649 | | |
5650 | 5650 | | |
5651 | 5651 | | |
| 5652 | + | |
| 5653 | + | |
| 5654 | + | |
| 5655 | + | |
| 5656 | + | |
| 5657 | + | |
| 5658 | + | |
| 5659 | + | |
5652 | 5660 | | |
5653 | 5661 | | |
5654 | 5662 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
0 commit comments