Repository navigation
expose CancelOptions & SetDataOptions - #2855
Conversation
|
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/tanstack/react-query/Hp9ECaWfwkZAMhuPW5jo1PuhoVGD |
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
|
Actually - will do another version |
|
Actually number 2 - my other idea created a dependency cycle |
|
theoretically, you could infer those types by extracting them from the
why would this be a breaking change? |
I did that at first but it doesn't work with invalidateQueries<TPageData = unknown>(filters?: InvalidateQueryFilters<TPageData>, options?: InvalidateOptions): Promise<void>;
invalidateQueries<TPageData = unknown>(queryKey?: QueryKey, filters?: InvalidateQueryFilters<TPageData>, options?: InvalidateOptions): Promise<void>;
It's changing publicly exposed types. Will break tRPC for instance since I merged that PR, but I'll just fix it and bump the |
I think they are only considered publicly exposed when being imported directly from if you import it also, per the docs:
So I'm happy to merge this if you are |
|
I'm happy! |
|
🎉 This PR is included in version 3.29.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
@all-contributors add @KATT for code? :) |
|
This project's configuration file has malformed JSON: .all-contributorsrc. Error:: Unexpected token ] in JSON at position 3864 |
|
@KATT would you like to fix the |
I can't see what's wrong with it! |
|
@KATT I think it might be the trailing comma which I added here manually 🤦 |
|
@all-contributors please add @KATT for code |
|
I've put up a pull request to add @KATT! 🎉 |
Background: it would be nice if I didn't have to do this :)
Technically, this is a breaking change - the other idea I had was to just expose these types in the
types.ts-file but then the linter complained about circular dep.It's hard structuring what is "internal" and what is "external" types - the way I go about it in tRPC is that I have folders called
internal/in various places and I make sure to only cherry-pick from those, and they aren't cherry-picked I doexport *