Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(query-core): improve type safety and performance in getMutationDefaults #8669

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

samuel871211
Copy link

@samuel871211 samuel871211 commented Feb 19, 2025

Description

Improve type safety and performance in getMutationDefaults by:

  1. Using explicit return type OmitKeyof<MutationObserverOptions<any, any, any, any>, 'mutationKey'> to ensure the return type matches the type defined in setMutationDefaults
  2. Aligning implementation with getQueryDefaults by using Object.assign

…tionDefaults`

- Change return type to exclude mutationKey using OmitKeyof
- Replace spread operator with Object.assign for better performance
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant