useFetch, how to type correctly.
I have this useFetch:
The route always returns 'status'.
The optional return types are 'statusMessage', 'city', 'stones' and 'location'. The only type my IDE returns is 'status', as it's always present. How can I properly access optional fields without overriding the type in useFetch.
The route always returns 'status'.
The optional return types are 'statusMessage', 'city', 'stones' and 'location'. The only type my IDE returns is 'status', as it's always present. How can I properly access optional fields without overriding the type in useFetch.