mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
template into ui
This commit is contained in:
1 parent
43ee86d34b
commit
8bb389eedd
13 files changed
+70
-206
No files matched your search
@@ -3,7 +3,7 @@ import { ValidationError } from '../error';
|
||||
|
||||
export default async function paginate(
|
||||
cursor: Cursor, page: number, pageSize: number,
|
||||
): Promise<[any[], number, number]> {
|
||||
): Promise<[any[]/* docs */, number/* numPages */, number/* count */]> {
|
||||
if (page <= 0) throw new ValidationError('page');
|
||||
const [count, pageDocs] = await Promise.all([
|
||||
cursor.count(),
|
||||
|
||||
Reference in new issue
Block a user