-
-
Notifications
You must be signed in to change notification settings - Fork 43
Description
Which @ngneat/query-* package(s) are relevant/releated to the feature request?
query
Description
I saw this issue but couldn't reopen it, so I created a new one.
In the above linked issue the issue is typing a value set by calling the query function, so ResultType seems like it should work. My issue is that I'm typing the return of that function in the function signature, like
getTodoById(todoId: string): Result<QueryObserverResult<Todo, Error>> {
...
}
Reason for this is so this function returns the query object itself and handle it as needed in another function/class/etc and be type safe. For now I've just duplicated the type locally, though its not perfect since the Result type uses the different types for the update options function param.
Proposed solution
Add Result as an exported type for Query
Alternatives considered
Currently replicating the type locally as best I can, also attempted ResultType but that doesnt seem to work in this instance.
Do you want to create a pull request?
Yes