| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
Hi @olishevskii thank you for opening a PR and trying to clean this up. If you take a look at Line 2840 in b4dbd73 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. |
Sorry, something went wrong.
|
Hi @ddelgrosso1. I see your point of view regarding defining a new interface NextPageFilesOptions. I've rewritten my solution using TypeScript utilities. Additionally, I noticed that a query can be not only like GetFilesOptions but also like GetFilesCallback. Lines 2798 to 2802 in b4dbd73 |
Sorry, something went wrong.
| } | ||
|
|
||
| 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.
Sorry, something went wrong.
There was a problem hiding this comment.
I have fixed it.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
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 🦕