mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
使用export = 替换export default
This commit is contained in:
1 parent
12af2f7542
commit
c63643d349
15 files changed
+38
-25
No files matched your search
@@ -1,7 +1,7 @@
|
||||
import { Cursor } from 'mongodb';
|
||||
import { ValidationError } from '../error';
|
||||
|
||||
export default async function paginate(
|
||||
async function paginate(
|
||||
cursor: Cursor, page: number, pageSize: number,
|
||||
): Promise<[any[]/* docs */, number/* numPages */, number/* count */]> {
|
||||
if (page <= 0) throw new ValidationError('page');
|
||||
@@ -13,4 +13,6 @@ export default async function paginate(
|
||||
return [pageDocs, numPages, count];
|
||||
}
|
||||
|
||||
export = paginate;
|
||||
|
||||
global.Hydro.lib.paginate = paginate;
|
||||
Reference in new issue
Block a user