You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.
As far as I understand the onCompleted callback is being triggered when a query has finished loading independent of whether there was any data returned or not (e.g. in an error case). This means it is possible to call the callback with data set to undefined.
Therefore the typing should probably be:
onCompleted?: (data: TData|undefined)=>void;
Actual outcome:
The current typings are:
onCompleted?: (data: TData)=>void;
making it easy to forget handling the undefined-case in the code.
How to reproduce the issue:
n/a I think but would be happy to make something up if people think it's useful.
Intended outcome:
As far as I understand the
onCompleted
callback is being triggered when a query has finished loading independent of whether there was any data returned or not (e.g. in an error case). This means it is possible to call the callback with data set toundefined
.Therefore the typing should probably be:
Actual outcome:
The current typings are:
making it easy to forget handling the
undefined
-case in the code.How to reproduce the issue:
n/a I think but would be happy to make something up if people think it's useful.
Version
The text was updated successfully, but these errors were encountered: