Fix: improve GetFilesResponse interface#2466
Conversation
|
Hi @olishevskii thank you for opening a PR and trying to clean this up. If you take a look at Line 2840 in b4dbd73 GetFilesOptions & {pageToken?: string}. This PR omits the GetFilesOptions portion.
I'm also not sure we want to define a new interface that will need to be exported just to hold the page token portion. |
|
Hi @ddelgrosso1. I see your point of view regarding defining a new interface Lines 2798 to 2802 in b4dbd73 |
| } | ||
|
|
||
| export type GetFilesResponse = [File[], {}, unknown]; | ||
| export type GetFilesResponse = [File[], (GetFilesOptions | GetFilesCallback) & Partial<Pick<GetFilesOptions, 'pageToken'>>, unknown]; |
There was a problem hiding this comment.
You can omit GetFilesCallback, query can only be GetFilesOptions or an empty object. It will never get assigned the callback.
There was a problem hiding this comment.
I have fixed it.
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
Fixes #2464 🦕