Replies: 3 comments
|
I can reproduce the naming conflict from the exports.
export * from '@tanstack/query-core'but later exports: export type { QueryFilters } from './useIsFetching'and export type QueryFilters = MaybeRefDeep<QF> | (() => MaybeRefDeep<QF>)So the Vue package is shadowing the core A backwards-compatible path might be:
export type UseIsFetchingQueryFilters = MaybeRefDeep<CoreQueryFilters> | (() => MaybeRefDeep<CoreQueryFilters>)
That would make this import work as expected: import type { QueryFilters } from '@tanstack/vue-query'while still keeping the Vue composable-specific filter type available under a name that describes where the extra I think this is worth a PR, especially if it includes a type test that imports |
|
Nice, thanks for opening the PR. |
Uh oh!
There was an error while loading. Please reload this page.
I’m building a wrapper around Vue Query and want to type filters for
removeQueriesusing the same type it accepts:I would expect to import
QueryFiltersfrom@tanstack/vue-query. Currently, that name refers to the Vue-specificuseIsFetchingfilters instead of Core’s genericQueryFilters.Could we rename the Vue-specific types, allowing the core types to be re-exported normally? This would avoid importing
@tanstack/query-coredirectly in wrapper packages.I tested this locally. The type tests, relevant runtime tests, and package build pass.
Happy to open a PR
All reactions