Add JSDoc type annotations
I have added type annotations and fixed associated type errors.
I have addressed this in pull request #3732 and will proceed to close this one. I'll handle the areas requiring type changes separately.
I would prefer to update this PR with those changes rather than abandoning it.
Codecov Report
Attention: Patch coverage is 98.88889% with 1 line in your changes missing coverage. Please review.
Project coverage is 97.64%. Comparing base (
cef8123) to head (4467e3a). Report is 6 commits behind head on master.
| Files | Patch % | Lines |
|---|---|---|
| lib/rules/no-unused-class-component-methods.js | 50.00% | 1 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## master #3731 +/- ##
==========================================
+ Coverage 97.62% 97.64% +0.01%
==========================================
Files 134 134
Lines 9617 9662 +45
Branches 3488 3514 +26
==========================================
+ Hits 9389 9434 +45
Misses 228 228
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I have rebased and cleaned up the commits. Please check.
I've gone ahead and updated this to remove all the breaking changes. The way to safely resolve TypeScript's inability to understand that an x.foo check is identical to 'foo' in x && x.foo semantically is not to hardcode AST node types (that a custom parser might not match) but to add 'foo' in x and let TS do the narrowing.