Skip to content
Discussion options

You must be logged in to vote

we don't have a generic for meta so its type cannot be inferred. In v5, you can use module augmentation:

declare module '@tanstack/react-query' {
  interface Register {
    queryMeta: Meta
    mutationMeta: Record<string, unknown>
  }
}

Replies: 2 comments 11 replies

Comment options

You must be logged in to vote
10 replies
@TkDodo
Comment options

@lkp-k
Comment options

@TkDodo
Comment options

@lkp-k
Comment options

@TkDodo
Comment options

Answer selected by denisborovikov
Comment options

You must be logged in to vote
1 reply
@TkDodo
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
8 participants