Repository navigation
refactor(query-core): add the 'override' modifier to members that override a base class member - #11904
Conversation
|
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 14 seconds. View limit detailsLimit details: You’ve used all 10 included reviews currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (9)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
…rride a base class member
41fcfe9 to
b0e4edc
Compare
|
View your CI Pipeline Execution ↗ for commit b0e4edc
☁️ Nx Cloud last updated this comment at |
🚀 Changeset Version Preview1 package(s) bumped directly, 24 bumped as dependents. 🟩 Patch bumps
|
size-limit report 📦
|
🎯 Changes
Adds the TypeScript
overridemodifier to thequery-coreclass members that override a member of their base class:onSubscribe/onUnsubscribein theSubscribablesubclasses (focusManager,onlineManager,QueryObserver,QueriesObserver,MutationObserver).InfiniteQueryObserveroverrides fromQueryObserver, including the fields that narrow the type of inherited methods.Query#destroy, andoptionalRemoveinQueryandMutation.The members were found with
--noImplicitOverride. The twooptionalRemoveimplementations were added on top, since that flag doesn't requireoverridefor an abstract member. Withoverride, TypeScript reports an error if the base member is renamed or removed, instead of silently turning the member into a new one.The abstract
Removable#optionalRemovealso gets a JSDoc description, which the implementations inherit.overrideis erased at compile time:Removabledeclaration.✅ Checklist
pnpm run test:pr, or these tests do not apply to this pull request.🚀 Release Impact