We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Wrong PaginateResult interface or implementation
PaginateResult
interface PaginateResult<T> { docs: T[]; totalDocs: number; limit: number; hasPrevPage: boolean; hasNextPage: boolean; page?: number | undefined; totalPages: number; offset: number; prevPage?: number | null | undefined; nextPage?: number | null | undefined; pagingCounter: number; meta?: any; [customLabel: string]: T[] | number | boolean | null | undefined; }
based on this, it is expected that the offset field is required instead of the page field, as I can judge from the results
offset
page
// base result out { "docs": [], "totalDocs": 0, "limit": 10, "totalPages": 1, "page": 1, "pagingCounter": 1, "hasPrevPage": false, "hasNextPage": false, "prevPage": null, "nextPage": null }
you should think about swapping offset and page places, so use interfaces in tests...
interface PaginateResult<T> { page: number | undefined; offset?: number; }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Wrong
PaginateResult
interface or implementationbased on this, it is expected that the
offset
field is required instead of thepage
field, as I can judge from the resultsyou should think about swapping
offset
andpage
places, so use interfaces in tests...The text was updated successfully, but these errors were encountered: