Skip to content
0

katanakit-js / Register

Interface: Register ​

Defined in: node_modules/.bun/@tanstack+query-core@5.104.1/node_modules/@tanstack/query-core/build/modern/hydration-B9t5w6NC.d.ts:1785

The interface to augment via declaration merging to override Query's default types repository-wide. Each field it declares replaces the default of the matching type: defaultError for DefaultError, queryKey for QueryKey, mutationKey for MutationKey, queryMeta for QueryMeta and mutationMeta for MutationMeta. Leave a field out to keep that type's default. Augment the module you install — @tanstack/react-query, @tanstack/vue-query, @tanstack/solid-query, @tanstack/svelte-query, @tanstack/preact-query, @tanstack/angular-query-experimental or @tanstack/lit-query. Augmenting @tanstack/query-core works too and covers every adapter at once.

Example ​

ts
// Use the module you installed — here, the React adapter.
declare module '@tanstack/react-query' {
  interface Register {
    defaultError: AxiosError
  }
}

Released under the MIT License.