unknown return type for QueryObserverResult 2nd parameter #108
-
I've been experimenting with Angular Query, and I must say I quite like it. However, I have a question about I managed to determine the return type based on the information available here. However, I'm still uncertain about the type of the second parameter (which is unknown according to screenshot). Is there a specific type for the second parameter, or perhaps I've overlooked something? It's worth mentioning that our coding standards require explicit return types, so I'd like to resolve this issue before introducing Angular Query to the team. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Beta Was this translation helpful? Give feedback.
The second generic param of the
QueryObserverResult
is the Error that would be returned if there was one.Since there is no real standard for what an Error is (e.g. it could be a
string
orError
object for example) this was defaulted tounknown
.But this makes it easier to convert to a concrete type that your Backend could return.