Repository navigation
refactor(lit-query/BaseController): type the context callback value as possibly 'undefined' and remove its 'no-unnecessary-condition' disable - #12311
Conversation
…efined' and give the remaining 'no-unnecessary-condition' disables a reason
|
|
View your CI Pipeline Execution ↗ for commit 2361215
☁️ Nx Cloud last updated this comment at |
🚀 Changeset Version Preview10 package(s) bumped directly, 14 bumped as dependents. 🟩 Patch bumps
|
size-limit report 📦
|
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Callback typing and comment removal packages/lit-query/src/controllers/BaseController.ts |
The context callback parameter is explicitly typed as `QueryClient |
Estimated code review effort: 1 (Trivial) | ~2 minutes
Change: Refactor
Suggested reviewers: chughgaurav
Merge Risk: 
Minimal · up to 23612
-
No merge-blocking issue is evident from this change; it is ready for normal checks.
Pre-merge checks: 
5
-
Full details: Docstring Coverage
-
Explanation
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 1 files.
-
Finishing Touches
-
Generate docstrings
-
- Commit to this branch
- Create a new PR
Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
# Conflicts: # packages/lit-query/src/QueryClientProvider.ts # packages/lit-query/src/controllers/BaseController.ts
🎯 Changes
BaseController: type thequeryClientContextcallbackvalueasQueryClient | undefined, since the provider sendsundefinedwhen it loses its client. Thevalue === undefinedcheck is then no longer flagged, so itsno-unnecessary-conditiondisable is removed.The public types are unchanged.
✅ Checklist
pnpm run test:pr, or these tests do not apply to this pull request.🚀 Release Impact
Summary by CodeRabbit