Type narrowing for hook that has multiple queries
My question is how to create a hook that wraps multiple useQueries and returns type narrowing for all the returned data.
Here's a stripped down version of the hook
I'd like to be able to do use this hook like the following:
Without there being a type error. I think we can be certain that data exists at the point of the log statement, right? So how can I structure my hook to have proper type narrowing?