Skip to content

Conversation

@salockhart
Copy link
Contributor

While using the queryCache.refetchQueries method with a predicate, I noticed that the query.state was typed as unknown. This blocks retrieval of the data member of state.

I have added types to the state member, CachedQueryState<T>. I decided to make it generic in order to be able to constrain the type for data - however, it could also be any just as easily.

Should this be backported back to DefinitelyTyped?

@tannerlinsley tannerlinsley merged commit 652567b into TanStack:master Apr 21, 2020
@tannerlinsley
Copy link
Collaborator

No. The DT types need to be deprecated tbh

@salockhart salockhart deleted the cached-query-types branch April 21, 2020 16:28
@nx-cloud
Copy link

nx-cloud bot commented Jun 25, 2025

View your CI Pipeline Execution ↗ for commit f24c309

Command Status Duration Result
nx affected --targets=test:sherif,test:knip,tes... ✅ Succeeded <1s View ↗
nx run-many --target=build --exclude=examples/*... ✅ Succeeded 1s View ↗

☁️ Nx Cloud last updated this comment at 2025-07-17 02:04:53 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants