-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Continue adding fetch methods to the SDK #1060
Continue adding fetch methods to the SDK #1060
Conversation
This pull request has been linked to 1 task:
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
|
* ``` | ||
*/ | ||
export function useAccountManagers( | ||
args: AccountManagersArgs, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't check this in detail, but wherever the request is optional, and from the example useAccountManagers()
it seems so, this param should optional.
Otherwise this will only work with an awkward empty object useAccountManagers({})
if no specific args are needed.
export function useAccountManagers({ | ||
suspense = false, | ||
...request | ||
}: AccountManagersArgs & { suspense?: boolean }): SuspendableResult<Paginated<AccountManager>> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe in the case of optional args for non-suspense signature we need to also provide a default value here:
}: AccountManagersArgs & { suspense?: boolean }): SuspendableResult<Paginated<AccountManager>> { | |
}: AccountManagersArgs & { suspense?: boolean } = {}): SuspendableResult<Paginated<AccountManager>> { |
This is not visible from the outside, it's just needed to TS to support all signatures.
No description provided.