Skip to content

initialData-function that can return undefined changes the type of data after isSuccess check #5865

You must be logged in to vote

interesting. seems like our generic gets undefined added into TData, as the return type of the Query after checking for is success is now:

QueryObserverSuccessResult<Todo | undefined, DefaultError>.data: Todo | undefined

This seems to be because of our overloads, and it's the same for v5. Probably worth opening an issue 👍

Replies: 1 comment 5 replies

You must be logged in to vote
5 replies
@TkDodo

@fredrik-andersson-yoin

@TkDodo

@fredrik-andersson-yoin

@TkDodo

Answer selected by fredrik-andersson-yoin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants