Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Typescript] options are not typed #5868

Closed
HendrikRoehm opened this issue Feb 4, 2021 · 1 comment
Closed

[Typescript] options are not typed #5868

HendrikRoehm opened this issue Feb 4, 2021 · 1 comment

Comments

@HendrikRoehm
Copy link

What you were expecting:
On using useGetOne and useGetMany the options argument should be typed.

What happened instead:
The options have any type.

Related code:
In useGetMany, I would suggest:

{
    onSuccess: ({ data: (Record | undefined)[]}) => void,
    onFailure: (error: any) => void
}

Additionally, Query should use the same types instead of just callback.

In useGetOne options have any type as well.

@fzaninotto
Copy link
Member

Fixed by #5849

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

3 participants