-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
fix(types): queryCache.getQueries #688
Conversation
this type should be added to almost all queryCache methods: getQueryData, setQueryData, getQuery, getQueries type QueryKeyOrPredicateFn:
| AnyQueryKey
| string
| boolean
| ((query: CachedQuery<unknown>) => boolean) |
@smashercosmo Sounds good! I wasn't sure how far I should go with it. I just pushed an update. |
Sorry about all of the weird extraneous commits, I was just trying to get the checks into a good state, there seems to be a preexisting race condition/timeout/something in a test or two 😢 |
@all-contributors Please add @jgettings for code |
I've put up a pull request to add @jgettings! 🎉 |
🎉 This PR is included in version 2.4.12 🎉 The release is available on: Your semantic-release bot 📦🚀 |
There were some missing types in the getQueries method's type definitions. I copied the parameter types from the other methods that allow
AnyQueryKey | string | function
, and addedboolean
as it looks like that's also a possible parameter type, looking at the implementation.