mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
修复一处类型错误
This commit is contained in:
1 parent
c0489546b8
commit
b5c1f41dd2
15 files changed
+44
-37
No files matched your search
@@ -73,7 +73,7 @@ export async function get(
|
||||
return pdoc;
|
||||
}
|
||||
|
||||
export function getMulti(domainId: string, query: object) {
|
||||
export function getMulti(domainId: string, query: FilterQuery<Pdoc>) {
|
||||
return document.getMulti(domainId, document.TYPE_PROBLEM, query);
|
||||
}
|
||||
|
||||
@@ -89,11 +89,11 @@ export function inc(domainId: string, _id: number, field: string, n: number): Pr
|
||||
return document.inc(domainId, document.TYPE_PROBLEM, _id, field, n);
|
||||
}
|
||||
|
||||
export function count(domainId: string, query: any) {
|
||||
export function count(domainId: string, query: FilterQuery<Pdoc>) {
|
||||
return document.count(domainId, document.TYPE_PROBLEM, query);
|
||||
}
|
||||
|
||||
export async function random(domainId: string, query: any): Promise<string | null> {
|
||||
export async function random(domainId: string, query: FilterQuery<Pdoc>): Promise<string | null> {
|
||||
const cursor = document.getMulti(domainId, document.TYPE_PROBLEM, query);
|
||||
const pcount = await cursor.count();
|
||||
if (pcount) {
|
||||
|
||||
Reference in new issue
Block a user